mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 07:42:59 +00:00
Change, simplify and document the conditions for the include files.
Fix two build problems in Fedora 8 and probably other hosts with a newer C library (reported by Dosadi on #reactos) svn path=/trunk/; revision=32681
This commit is contained in:
parent
2b61e55c4e
commit
cf076f2c7b
3 changed files with 27 additions and 15 deletions
|
@ -1373,9 +1373,9 @@ void CDFParser::NextToken()
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
i = 0;
|
i = 0;
|
||||||
while (((CurrentChar + i < LineLength) &&
|
while ((CurrentChar + i < LineLength) &&
|
||||||
(((ch = Line[CurrentChar + i]) >= 'a') && (ch <= 'z')) ||
|
(((ch = Line[CurrentChar + i]) >= 'a') && (ch <= 'z')) ||
|
||||||
((ch >= 'A') && (ch <= 'Z')) || (ch == '_')))
|
((ch >= 'A') && (ch <= 'Z')) || (ch == '_'))
|
||||||
{
|
{
|
||||||
CurrentString[i] = ch;
|
CurrentString[i] = ch;
|
||||||
i++;
|
i++;
|
||||||
|
|
|
@ -14,20 +14,25 @@
|
||||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#if defined(__FreeBSD__) || defined(__APPLE__)
|
// For character conversion functions like "wctomb" and "alloca" under Unix
|
||||||
# include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#else
|
|
||||||
# include <malloc.h>
|
#if defined(WIN32)
|
||||||
#endif // __FreeBSD__
|
// Under Win32 hosts, "alloca" is not defined by stdlib.h, but by malloc.h
|
||||||
|
// On the other hand, malloc.h is deprecated under some Unix hosts, so only include it for Win32 hosts.
|
||||||
|
#include <malloc.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include <ctype.h>
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
#include <float.h>
|
#include <float.h>
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
#include "ssprintf.h"
|
#include "ssprintf.h"
|
||||||
|
|
||||||
#ifndef WIN32
|
#ifndef WIN32
|
||||||
#include <ctype.h>
|
|
||||||
#define _finite __finite
|
#define _finite __finite
|
||||||
#define _isnan __isnan
|
#define _isnan __isnan
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifndef __APPLE__
|
#ifndef __APPLE__
|
||||||
inline int iswdigit ( wchar_t c )
|
inline int iswdigit ( wchar_t c )
|
||||||
|
@ -35,7 +40,6 @@ inline int iswdigit ( wchar_t c )
|
||||||
return ( c >= L'0' && c <= L'9' );
|
return ( c >= L'0' && c <= L'9' );
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
#endif//WIN32
|
|
||||||
|
|
||||||
#if defined(__FreeBSD__) || defined(__APPLE__) || defined(__CYGWIN__)
|
#if defined(__FreeBSD__) || defined(__APPLE__) || defined(__CYGWIN__)
|
||||||
# define __isnan isnan
|
# define __isnan isnan
|
||||||
|
|
|
@ -21,15 +21,23 @@
|
||||||
#endif//_MSC_VER
|
#endif//_MSC_VER
|
||||||
|
|
||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
# include <direct.h>
|
#include <direct.h>
|
||||||
# include <io.h>
|
#include <io.h>
|
||||||
#else
|
#else
|
||||||
# include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
# include <unistd.h>
|
#include <unistd.h>
|
||||||
# include <ctype.h>
|
|
||||||
# define MAX_PATH PATH_MAX
|
// Some hosts don't define PATH_MAX in unistd.h
|
||||||
|
#if !defined(PATH_MAX)
|
||||||
|
#include <limits.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#define MAX_PATH PATH_MAX
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
|
#include <ctype.h>
|
||||||
|
#include <string.h>
|
||||||
|
|
||||||
#include "xml.h"
|
#include "xml.h"
|
||||||
#include "ssprintf.h"
|
#include "ssprintf.h"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue