Some small portability improvements.
git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@2199 8092fc87-c524-0410-9efc-e669fe64eaf9
This commit is contained in:
+2
-2
@@ -17,8 +17,8 @@
|
|||||||
|
|
||||||
BUILD_SYSTEM='@BUILD_SYSTEM@'
|
BUILD_SYSTEM='@BUILD_SYSTEM@'
|
||||||
HOST_SYSTEM='@HOST_SYSTEM@'
|
HOST_SYSTEM='@HOST_SYSTEM@'
|
||||||
COMPILE=gcc
|
COMPILE='@COMPILE@'
|
||||||
MKDEPEND='gcc -MM'
|
MKDEPEND='@COMPILE@ -MM'
|
||||||
MAKE='@MAKE@'
|
MAKE='@MAKE@'
|
||||||
ECHON='@ECHON@'
|
ECHON='@ECHON@'
|
||||||
SED='@SED@'
|
SED='@SED@'
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ uqm_requirements()
|
|||||||
use_library SDL_image || exit 1
|
use_library SDL_image || exit 1
|
||||||
|
|
||||||
|
|
||||||
# Add defines for HAVE_READDIR_R, HAVE_SETENV, HAVE_STRUPR
|
# Add defines for HAVE_READDIR_R, HAVE_SETENV, HAVE_STRUPR,
|
||||||
# and HAVE_STRICMP
|
# and HAVE_STRICMP
|
||||||
define_have_symbol readdir_r
|
define_have_symbol readdir_r
|
||||||
define_have_symbol setenv
|
define_have_symbol setenv
|
||||||
@@ -45,9 +45,8 @@ uqm_requirements()
|
|||||||
define_have_type wchar_t
|
define_have_type wchar_t
|
||||||
define_have_type wint_t
|
define_have_type wint_t
|
||||||
|
|
||||||
|
# Add defines for HAVE_GETOPT_LONG and HAVE_REGEX_H
|
||||||
# Add defines for HAVE_GETOPT_H and HAVE_REGEX_H
|
define_have_symbol getopt_long
|
||||||
define_have_header getopt.h
|
|
||||||
define_have_header regex.h
|
define_have_header regex.h
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -279,7 +278,8 @@ uqm_process_config() {
|
|||||||
substitute_vars SUBSTITUTE_VARS SUBSTITUTE_FILES src "$BUILD_WORK"
|
substitute_vars SUBSTITUTE_VARS SUBSTITUTE_FILES src "$BUILD_WORK"
|
||||||
|
|
||||||
# Make build.vars from build.vars.in, substituting variables.
|
# Make build.vars from build.vars.in, substituting variables.
|
||||||
SUBSTITUTE_VARS="BUILD_SYSTEM HOST_SYSTEM CFLAGS LDFLAGS MAKE \
|
SUBSTITUTE_VARS="BUILD_SYSTEM HOST_SYSTEM COMPILE \
|
||||||
|
CFLAGS LDFLAGS MAKE \
|
||||||
ECHON DEBUG SED SOUNDMODULE \
|
ECHON DEBUG SED SOUNDMODULE \
|
||||||
HAVE_OPENGL HAVE_REGEX_H_FLAG USE_ZIP_IO \
|
HAVE_OPENGL HAVE_REGEX_H_FLAG USE_ZIP_IO \
|
||||||
USE_PLATFORM_ACCEL \
|
USE_PLATFORM_ACCEL \
|
||||||
|
|||||||
@@ -235,4 +235,6 @@ SYMBOL_wint_t_EXTRA="#include <wchar.h>"
|
|||||||
|
|
||||||
SYMBOL_iswgraph_EXTRA="#include <wctype.h>"
|
SYMBOL_iswgraph_EXTRA="#include <wctype.h>"
|
||||||
|
|
||||||
|
SYMBOL_getopt_long_EXTRA="#include <getopt.h>"
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -40,8 +40,8 @@
|
|||||||
/* Defined if your system has stricmp of its own */
|
/* Defined if your system has stricmp of its own */
|
||||||
@HAVE_STRICMP@
|
@HAVE_STRICMP@
|
||||||
|
|
||||||
/* Defined if your system has getopt.h */
|
/* Defined if your system has getopt_long */
|
||||||
@HAVE_GETOPT_H@
|
@HAVE_GETOPT_LONG@
|
||||||
|
|
||||||
/* Defined if your system has iswgraph of its own*/
|
/* Defined if your system has iswgraph of its own*/
|
||||||
@HAVE_ISWGRAPH@
|
@HAVE_ISWGRAPH@
|
||||||
|
|||||||
@@ -29,7 +29,7 @@
|
|||||||
|
|
||||||
#include <config.h>
|
#include <config.h>
|
||||||
|
|
||||||
#ifndef HAVE_GETOPT_H
|
#ifndef HAVE_GETOPT_LONG
|
||||||
#if !defined __STDC__ || !__STDC__
|
#if !defined __STDC__ || !__STDC__
|
||||||
/* This is a separate conditional since some stdc systems
|
/* This is a separate conditional since some stdc systems
|
||||||
reject `defined (const)'. */
|
reject `defined (const)'. */
|
||||||
@@ -1057,4 +1057,4 @@ main (argc, argv)
|
|||||||
|
|
||||||
#endif /* TEST */
|
#endif /* TEST */
|
||||||
|
|
||||||
#endif /* HAVE_GETOPT_H */
|
#endif /* HAVE_GETOPT_LONG */
|
||||||
|
|||||||
@@ -20,7 +20,7 @@
|
|||||||
|
|
||||||
#include <config.h>
|
#include <config.h>
|
||||||
|
|
||||||
#ifndef HAVE_GETOPT_H
|
#ifndef HAVE_GETOPT_LONG
|
||||||
#include "getopt.h"
|
#include "getopt.h"
|
||||||
|
|
||||||
#if !defined __STDC__ || !__STDC__
|
#if !defined __STDC__ || !__STDC__
|
||||||
@@ -186,4 +186,4 @@ main (argc, argv)
|
|||||||
|
|
||||||
#endif /* TEST */
|
#endif /* TEST */
|
||||||
|
|
||||||
#endif /* HAVE_GETOPT_H */
|
#endif /* HAVE_GETOPT_LONG */
|
||||||
|
|||||||
@@ -41,8 +41,8 @@
|
|||||||
/* Defined if your system has stricmp of its own */
|
/* Defined if your system has stricmp of its own */
|
||||||
#define HAVE_STRICMP
|
#define HAVE_STRICMP
|
||||||
|
|
||||||
/* Defined if your system has getopt.h */
|
/* Defined if your system has getopt_long */
|
||||||
#undef HAVE_GETOPT_H
|
#undef HAVE_GETOPT_LONG
|
||||||
|
|
||||||
/* Defined if your system has iswgraph of its own*/
|
/* Defined if your system has iswgraph of its own*/
|
||||||
#define HAVE_ISWGRAPH
|
#define HAVE_ISWGRAPH
|
||||||
|
|||||||
@@ -20,7 +20,6 @@
|
|||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <memory.h>
|
|
||||||
#include "port.h"
|
#include "port.h"
|
||||||
#include "types.h"
|
#include "types.h"
|
||||||
#include "uio.h"
|
#include "uio.h"
|
||||||
|
|||||||
+1
-1
@@ -20,7 +20,7 @@
|
|||||||
# include <unistd.h>
|
# include <unistd.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef HAVE_GETOPT_H
|
#ifdef HAVE_GETOPT_LONG
|
||||||
# include <getopt.h>
|
# include <getopt.h>
|
||||||
#else
|
#else
|
||||||
# include "getopt/getopt.h"
|
# include "getopt/getopt.h"
|
||||||
|
|||||||
Reference in New Issue
Block a user