Index: config.h.in =================================================================== --- config.h.in (revision 29286) +++ config.h.in (revision 29287) @@ -5,28 +5,8 @@ #ifndef PCB_CONFIG_H #define PCB_CONFIG_H -/****************************************************************************/ -/* Static defines to enable extra features on some systems; once we get - testers on those systems, we can remove them and see if scconfig figured - everything. */ +#include -/* Enable extensions on AIX 3, Interix. */ -#ifndef _ALL_SOURCE -# define _ALL_SOURCE 1 -#endif -/* Enable threading extensions on Solaris. */ -#ifndef _POSIX_PTHREAD_SEMANTICS -# define _POSIX_PTHREAD_SEMANTICS 1 -#endif -/* Enable extensions on HP NonStop. */ -#ifndef _TANDEM_SOURCE -# define _TANDEM_SOURCE 1 -#endif -/* Enable general extensions on Solaris. */ -#ifndef __EXTENSIONS__ -# define __EXTENSIONS__ 1 -#endif - /****************************************************************************/ /* Package properties */ @@ -37,133 +17,6 @@ /* These ones are already autodetected by scconfig */ @] -print {\n\n/* Macro to add a funciton attribute to suppress "function unused" for static inline functions declared in .h files */\n} -print_ternary ?cc/func_attr/unused/presents {#define PCB_FUNC_UNUSED __attribute__((unused))} {#define PCB_FUNC_UNUSED} - -print {\n\n/* inline, as detected ("inline" or empty) */\n} -print_ternary ?cc/inline {#define PCB_INLINE_DETECTED inline} {#define PCB_INLINE_DETECTED /* no inline */} - -print {\n\n/* final, combined keywords and attributes for an inline function */\n} -print {#define PCB_INLINE static PCB_INLINE_DETECTED PCB_FUNC_UNUSED\n\n} - -print {\n\n/* Wether setenv() works */\n} -print_ternary ?libs/env/setenv/presents {#define PCB_HAVE_SETENV 1} {/* #undef PCB_HAVE_SETENV */} - -print {\n\n/* Wether putenv() works */\n} -print_ternary ?libs/env/putenv/presents {#define PCB_HAVE_PUTENV 1} {/* #undef PCB_HAVE_PUTENV */} - -print {\n\n/* Wether usleep() works */\n} -print_ternary ?libs/time/usleep/presents {#define PCB_HAVE_USLEEP 1} {/* #undef PCB_HAVE_USLEEP */} - -print {\n\n/* Wether win32 Sleep() works */\n} -print_ternary ?libs/time/Sleep/presents {#define PCB_HAVE_WSLEEP 1} {/* #undef PCB_HAVE_WSLEEP */} - -print {\n\n/* Wether select() works */\n} -print_ternary ?libs/socket/select/presents {#define PCB_HAVE_SELECT 1} {/* #undef PCB_HAVE_SELECT */} - -print {\n\n/* Define to 1 if you have the `snprintf' function. */\n} -print_ternary ?libs/snprintf {#define HAVE_SNPRINTF 1} {/* #undef HAVE_SNPRINTF */} - -print {\n\n/* Define to 1 if you have the `vsnprintf' function. */\n} -print_ternary ?libs/vsnprintf {#define HAVE_VSNPRINTF 1} {/* #undef HAVE_VSNPRINTF */} - -print {\n\n/* Define to 1 if you have the `getcwd' function. */\n} -print_ternary ?libs/fs/getcwd/presents {#define HAVE_GETCWD 1} {/* #undef HAVE_GETCWD */} - -print {\n\n/* Define to 1 if you have the `_getcwd' function. */\n} -print_ternary ?libs/fs/_getcwd/presents {#define HAVE__GETCWD 1} {/* #undef HAVE__GETCWD */} - -print {\n\n/* Define to 1 if you have the `getwd' function. */\n} -print_ternary ?libs/fs/_getwd/presents {#define HAVE_GETWD 1} {/* #undef HAVE_GETWD */} - -print {\n\n/* Define to 1 if you have the header file. */\n} -print_ternary ?libs/gui/gd/presents {#define HAVE_GD_H 1} {/* #undef HAVE_GD_H */} - -print {\n\n/* Define to 1 if you have the `gdImageGif' function. */\n} -print_ternary ?libs/gui/gd/gdImageGif/presents {#define HAVE_GDIMAGEGIF 1} {/* #undef HAVE_GDIMAGEGIF */} - -print {\n\n/* Define to 1 if you have the `gdImageJpeg' function. */\n} -print_ternary ?libs/gui/gd/gdImageJpeg/presents {#define HAVE_GDIMAGEJPEG 1} {/* #undef HAVE_GDIMAGEJPEG */} - -print {\n\n/* Define to 1 if you have the `gdImagePng' function. */\n} -print_ternary ?libs/gui/gd/gdImagePng/presents {#define HAVE_GDIMAGEPNG 1} {/* #undef HAVE_GDIMAGEPNG */} - -print {\n\n/* Define to 1 if you have the `gdImageSetResolution' function. */\n} -print_ternary ?libs/gui/gd/gdImageSetResolution/presents {#define HAVE_GD_RESOLUTION 1} {/* #undef HAVE_GD_RESOLUTION */} - -print {\n\n/* Define to 1 if you have the `getpwuid' function. */\n} -print_ternary ?libs/userpass/getpwuid/presents {#define HAVE_GETPWUID 1} {/* #undef HAVE_GETPWUID */} - -print {\n\n/* Define to 1 if you have the `rint' function. */\n} -print_ternary ?libs/math/rint/presents {#define HAVE_RINT 1} {/* #undef HAVE_RINT */} - -print {\n\n/* Define to 1 if you have the `round' function. */\n} -print_ternary ?libs/math/round/presents {#define HAVE_ROUND 1} {/* #undef HAVE_ROUND */} - -print {\n\n/* Wrapper for S_ISLNK(x); always return 0 if S_ISLNK doesn't exist */\n} -switch ?/target/libs/fs/stat/macros/S_ISLNK - case {^$} print {#define WRAP_S_ISLNK(x) 0}; end; - default print [@#define WRAP_S_ISLNK(x) @/target/libs/fs/stat/macros/S_ISLNK@(x)@]; end; -end; - -print {\n\n/* Define to 1 if Xinerama is available */\n} -print_ternary ?libs/gui/xinerama/presents {#define HAVE_XINERAMA 1} {/*#undef HAVE_XINERAMA */} - -print {\n\n/* Define to 1 if Xrender is available */\n} -print_ternary ?libs/gui/xrender/presents {#define HAVE_XRENDER 1} {/*#undef HAVE_XRENDER */} - -print {\n\n/* Define to 1 if we should use windows api for dynamic linking. */\n} -print_ternary ?libs/LoadLibrary/presents {#define USE_LOADLIBRARY 1} {/* #undef USE_LOADLIBRARY */} - -print {\n\n/* Define to 1 if we should use mkdtemp for creating temp files. */\n} -print_ternary ?libs/fs/mkdtemp/presents {#define HAVE_MKDTEMP 1} {/* #undef HAVE_MKDTEMP */} - -print {\n\n/* Define to 1 if you have the `realpath' function. */\n} -print_ternary ?libs/fs/realpath/presents {#define HAVE_REALPATH 1} {/* #undef HAVE_REALPATH */} - -print {\n\n/* Select which mechanism to use for running child processes. */\n} -print_ternary ?/target/libs/proc/wait/presents {#define USE_FORK_WAIT 1} {/* #undef USE_FORK_WAIT */} -print {\n} -print_ternary ?/target/libs/proc/_spawnvp/presents {#define USE_SPAWNVP 1} {/* #undef USE_SPAWNVP */} - -print {\n\n/* Select which mechanism to use for creating a directory. */\n} -print_ternary ?/target/libs/fs/mkdir/presents {#define USE_MKDIR 1} {/* #undef USE_MKDIR */} -print {\n} -print_ternary ?/target/libs/fs/_mkdir/presents {#define USE__MKDIR 1} {/* #undef USE__MKDIR */} -print [@ -#define MKDIR_NUM_ARGS 0@?/target/libs/fs/_mkdir/num_args@@?/target/libs/fs/mkdir/num_args@ -@] - -print {\n\n/* Define whether we have specific signals. */\n} -print_ternary ?signal/names/SIGPIPE/presents {#define PCB_HAVE_SIGPIPE 1} {/* #undef PCB_HAVE_SIGPIPE */} -print {\n} -print_ternary ?signal/names/SIGSEGV/presents {#define PCB_HAVE_SIGSEGV 1} {/* #undef PCB_HAVE_SIGSEGV */} -print {\n} -print_ternary ?signal/names/SIGABRT/presents {#define PCB_HAVE_SIGABRT 1} {/* #undef PCB_HAVE_SIGABRT */} -print {\n} -print_ternary ?signal/names/SIGINT/presents {#define PCB_HAVE_SIGINT 1} {/* #undef PCB_HAVE_SIGINT */} -print {\n} -print_ternary ?signal/names/SIGHUP/presents {#define PCB_HAVE_SIGHUP 1} {/* #undef PCB_HAVE_SIGHUP */} -print {\n} -print_ternary ?signal/names/SIGTERM/presents {#define PCB_HAVE_SIGTERM 1} {/* #undef PCB_HAVE_SIGTERM */} -print {\n} -print_ternary ?signal/names/SIGQUIT/presents {#define PCB_HAVE_SIGQUIT 1} {/* #undef PCB_HAVE_SIGQUIT */} -print {\n} - -print {\n\n/* Wether fungw is system installed */\n} -print_ternary /local/pcb/fungw_system {#define PCB_HAVE_SYS_FUNGW 1} {/* #undef PCB_HAVE_SYS_FUNGW */} - -print {\n/* Code warnings for TODO, portable (unlike #warning) */} -if ?cc/pragma_message -then -print [@ -#define DO_PRAGMA(arg) _Pragma(#arg) -#define TODO(x) DO_PRAGMA(message("TODO: " #x)) -@] -else -print {\n/* Not available */\n#define TODO(x)\n} -end - # calculate the /local/confdir: either specified conf-time or compatibility fallback switch /local/confdir case {^$} put /local/confdir_final {PCBSHAREDIR}; end @@ -171,36 +24,7 @@ end print [@ - -/* The host "triplet" - it's really a pair now: machine-os */ -#define HOST "@sys/sysid@" - -/* Directory separator char */ -#define PCB_DIR_SEPARATOR_C '@sys/path_sep_escaped@' - -/* Directory separator string */ -#define PCB_DIR_SEPARATOR_S "@sys/path_sep_escaped@" - -/* Search path separator string */ -#define PCB_PATH_DELIMETER ":" - /****************************************************************************/ -/* These are static; they are kept "just in case", for further porting */ - -/* C89 has atexit() */ -#define HAS_ATEXIT 1 - -/* C89 has this */ -#define HAVE_UNISTD_H 1 - -/* Define to 1 if you have the `canonicalize_file_name' function. - It's a GNU extension, assume we don't have it and fall back to - realpath() */ -/* #define HAVE_CANONICALIZE_FILE_NAME 1 */ -/* Define if canonicalize_file_name is not declared in system header files. */ -/* #undef NEED_DECLARATION_CANONICALIZE_FILE_NAME */ - -/****************************************************************************/ /* Paths */ @] @@ -234,82 +58,10 @@ #define PCB_VERSION "@/local/version@" #define PCB_REVISION "@/local/revision@" -/* Format: abccrrrrr where a, b and c are pcb-rnd version numbers and r is - the svn revision number (optional) */ -#define PCB_API_VER @/local/apiver@ - - -/* Define to 1 if you have the `dmalloc' library (-ldmalloc); - (memory debugging without valgrind) */ -@] - -print_ternary libs/sul/dmalloc/presents {#define HAVE_LIBDMALLOC 1} {/*#undef HAVE_LIBDMALLOC */} - -print [@ -/* -The documentation says it's not necessary to include dmalloc.h. -Pros: getting source line info -Cons: can't include from here, needs to be included from the bottom of the #include list from each file -#ifdef HAVE_LIBDMALLOC -#include -#endif -*/ - -@?/local/pcb/include_stdint@ - -/* Coordinate type and properties, as detected by scconfig */ -typedef @/local/pcb/coord_type@ pcb_coord_t; -#define COORD_MAX @/local/pcb/coord_max@ -#define coord_abs pcb_coord_abs - -/* Other autodetected types */ -typedef @/local/pcb/long64@ pcb_long64_t; - /* the dot-dir: where to save user config under ther user's home; it's used as ~/DOT_PCB_RND/ */ #define DOT_PCB_RND "@/local/pcb/dot_pcb_rnd@" -/* gtk */ -#define PCB_GTK_KEY(keyname) (@?libs/gui/gtk2/key_prefix@ ## keyname) - -/* ./configure --workaround requests: */ -@?/local/pcb/workaround_defs@ - -/* Make sure to catch usage of non-portable functions in debug mode - This is in here only because config.h should be included from every source - file. */ -#ifndef NDEBUG -# undef strdup -# undef strndup -# undef snprintf -# undef round -# undef strcasecmp -# define strdup never_use_strdup__use_pcb_strdup -# define strndup never_use_strndup__use_pcb_strndup -# define snprintf never_use_snprintf__use_pcb_snprintf -# define round never_use_round__use_pcb_round -# define strcasecmp never_use_strcasecmp__use_pcb_strcasecmp -# ifndef PCB_SAFE_FS -# undef fopen -# undef popen -# undef system -# undef remove -# undef rename -# define fopen never_use_fopen__use_pcb_fopen -# define popen never_use_popen__use_pcb_popen -# define system never_use_system__use_pcb_system -# define remove never_use_remove__use_pcb_remove -# define rename never_use_rename__use_pcb_rename -# define mkdir never_use_mkdir__use_pcb_mkdir -# define unlink never_use_unlink__use_pcb_unlink -# define opendir never_use_opendir__use_pcb_opendir -# define readdir never_use_readdir__use_pcb_readdir -# define closedir never_use_closedir__use_pcb_closedir -# define access never_use_access__use_pcb_file_readable -# endif - #endif - -#endif @]