From: Peter Johnson Date: Fri, 13 Jul 2007 20:56:28 +0000 (-0000) Subject: Clean up a number of obsolete autoconf-detected standard C things. X-Git-Tag: v0.6.2~8^2~20 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=69fc913eec98e7767ddca60ab42d96a7ddf63537;p=yasm Clean up a number of obsolete autoconf-detected standard C things. svn path=/trunk/yasm/; revision=1892 --- diff --git a/Mkfiles/dj/config.h b/Mkfiles/dj/config.h index 759ced57..1c834263 100644 --- a/Mkfiles/dj/config.h +++ b/Mkfiles/dj/config.h @@ -13,12 +13,20 @@ /* */ /* #undef HAVE_CATGETS */ +/* Define to 1 if you have the MacOS X function CFLocaleCopyCurrent in the + CoreFoundation framework. */ +/* #undef HAVE_CFLOCALECOPYCURRENT */ + +/* Define to 1 if you have the MacOS X function CFPreferencesCopyAppValue in + the CoreFoundation framework. */ +/* #undef HAVE_CFPREFERENCESCOPYAPPVALUE */ + /* Define if the GNU dcgettext() function is already present or preinstalled. */ /* #undef HAVE_DCGETTEXT */ -/* Define if you don't have `vprintf' but do have `_doprnt'. */ -/* #undef HAVE_DOPRNT */ +/* Define to 1 if you have the header file. */ +/* #undef HAVE_DIRECT_H */ /* Define to 1 if you have the `getcwd' function. */ #define HAVE_GETCWD 1 @@ -41,15 +49,6 @@ /* Define to 1 if you have the header file. */ /* #undef HAVE_LIBGEN_H */ -/* Define if you have the header file. */ -#define HAVE_LIMITS_H 1 - -/* Define if you have the `memcpy' function. */ -#define HAVE_MEMCPY 1 - -/* Define if you have the `memmove' function. */ -#define HAVE_MEMMOVE 1 - /* Define if you have the header file. */ #define HAVE_MEMORY_H 1 @@ -83,36 +82,27 @@ /* Define if you have the `strncasecmp' function. */ #define HAVE_STRNCASECMP 1 -/* Define if you have the `strrchr' function. */ -#define HAVE_STRRCHR 1 - /* Define if you have the `strsep' function. */ #define HAVE_STRSEP 1 -/* Define if you have the header file. */ -#define HAVE_SYS_PARAM_H 1 - /* Define if you have the header file. */ #define HAVE_SYS_STAT_H 1 /* Define if you have the header file. */ #define HAVE_SYS_TYPES_H 1 -/* Define if you have that is POSIX.1 compatible. */ -#define HAVE_SYS_WAIT_H 1 - /* Define if you have the `toascii' function. */ #define HAVE_TOASCII 1 /* Define if you have the header file. */ #define HAVE_UNISTD_H 1 -/* Define if you have the vprintf function. */ -#define HAVE_VPRINTF 1 - /* Define to 1 if you have the `vsnprintf' function. */ /* #undef HAVE_VSNPRINTF */ +/* Define to 1 if you have the `_stricmp' function. */ +/* #undef HAVE__STRICMP */ + /* Name of package */ #define PACKAGE "yasm" diff --git a/Mkfiles/vc/config.h b/Mkfiles/vc/config.h index 942f3224..d217c544 100644 --- a/Mkfiles/vc/config.h +++ b/Mkfiles/vc/config.h @@ -13,12 +13,20 @@ /* */ /* #undef HAVE_CATGETS */ +/* Define to 1 if you have the MacOS X function CFLocaleCopyCurrent in the + CoreFoundation framework. */ +/* #undef HAVE_CFLOCALECOPYCURRENT */ + +/* Define to 1 if you have the MacOS X function CFPreferencesCopyAppValue in + the CoreFoundation framework. */ +/* #undef HAVE_CFPREFERENCESCOPYAPPVALUE */ + /* Define if the GNU dcgettext() function is already present or preinstalled. */ /* #undef HAVE_DCGETTEXT */ -/* Define if you don't have `vprintf' but do have `_doprnt'. */ -/* #undef HAVE_DOPRNT */ +/* Define to 1 if you have the header file. */ +#define HAVE_DIRECT_H 1 /* Define to 1 if you have the `getcwd' function. */ #define HAVE_GETCWD 1 @@ -41,15 +49,6 @@ /* Define to 1 if you have the header file. */ /* #undef HAVE_LIBGEN_H */ -/* Define if you have the header file. */ -#define HAVE_LIMITS_H 1 - -/* Define if you have the `memcpy' function. */ -#define HAVE_MEMCPY 1 - -/* Define if you have the `memmove' function. */ -#define HAVE_MEMMOVE 1 - /* Define if you have the header file. */ /* #undef HAVE_MEMORY_H */ @@ -72,7 +71,7 @@ /* #undefine HAVE_STRCMPI */ /* Define if you have the `stricmp' function. */ -#define HAVE__STRICMP 1 +/* #undefine HAVE_STRICMP */ /* Define if you have the header file. */ /* #undef HAVE_STRINGS_H */ @@ -83,24 +82,15 @@ /* Define if you have the `strncasecmp' function. */ /* #undef HAVE_STRNCASECMP */ -/* Define if you have the `strrchr' function. */ -/* #undef HAVE_STRRCHR */ - /* Define if you have the `strsep' function. */ /* #undef HAVE_STRSEP */ -/* Define if you have the header file. */ -/* #undef HAVE_SYS_PARAM_H */ - /* Define if you have the header file. */ /* #undef HAVE_SYS_STAT_H */ /* Define if you have the header file. */ #define HAVE_SYS_TYPES_H 1 -/* Define if you have that is POSIX.1 compatible. */ -/* #undef HAVE_SYS_WAIT_H */ - /* Define if you have the `toascii' function. */ #define HAVE_TOASCII 1 #define toascii __toascii @@ -108,12 +98,12 @@ /* Define if you have the header file. */ /* #undef HAVE_UNISTD_H */ -/* Define if you have the vprintf function. */ -#define HAVE_VPRINTF 1 - /* Define to 1 if you have the `vsnprintf' function. */ /* #undef HAVE_VSNPRINTF */ +/* Define to 1 if you have the `_stricmp' function. */ +#undef HAVE__STRICMP 1 + /* Name of package */ #define PACKAGE "yasm" diff --git a/Mkfiles/vc8/config.h b/Mkfiles/vc8/config.h index 91168c61..62f2e7ce 100644 --- a/Mkfiles/vc8/config.h +++ b/Mkfiles/vc8/config.h @@ -13,12 +13,20 @@ /* */ /* #undef HAVE_CATGETS */ +/* Define to 1 if you have the MacOS X function CFLocaleCopyCurrent in the + CoreFoundation framework. */ +/* #undef HAVE_CFLOCALECOPYCURRENT */ + +/* Define to 1 if you have the MacOS X function CFPreferencesCopyAppValue in + the CoreFoundation framework. */ +/* #undef HAVE_CFPREFERENCESCOPYAPPVALUE */ + /* Define if the GNU dcgettext() function is already present or preinstalled. */ /* #undef HAVE_DCGETTEXT */ -/* Define if you don't have `vprintf' but do have `_doprnt'. */ -/* #undef HAVE_DOPRNT */ +/* Define to 1 if you have the header file. */ +#define HAVE_DIRECT_H 1 /* Define to 1 if you have the `getcwd' function. */ #define HAVE_GETCWD 1 @@ -41,15 +49,6 @@ /* Define to 1 if you have the header file. */ /* #undef HAVE_LIBGEN_H */ -/* Define if you have the header file. */ -#define HAVE_LIMITS_H 1 - -/* Define if you have the `memcpy' function. */ -#define HAVE_MEMCPY 1 - -/* Define if you have the `memmove' function. */ -#define HAVE_MEMMOVE 1 - /* Define if you have the header file. */ /* #undef HAVE_MEMORY_H */ @@ -72,7 +71,7 @@ /* #undef HAVE_STRCMPI */ /* Define if you have the `stricmp' function. */ -#define HAVE__STRICMP 1 +/* #undefine HAVE_STRICMP */ /* Define if you have the header file. */ /* #undef HAVE_STRINGS_H */ @@ -83,24 +82,15 @@ /* Define if you have the `strncasecmp' function. */ /* #undef HAVE_STRNCASECMP */ -/* Define if you have the `strrchr' function. */ -/* #undef HAVE_STRRCHR */ - /* Define if you have the `strsep' function. */ /* #undef HAVE_STRSEP */ -/* Define if you have the header file. */ -/* #undef HAVE_SYS_PARAM_H */ - /* Define if you have the header file. */ /* #undef HAVE_SYS_STAT_H */ /* Define if you have the header file. */ #define HAVE_SYS_TYPES_H 1 -/* Define if you have that is POSIX.1 compatible. */ -/* #undef HAVE_SYS_WAIT_H */ - /* Define if you have the `toascii' function. */ #define HAVE_TOASCII 1 #define toascii __toascii @@ -108,12 +98,12 @@ /* Define if you have the header file. */ /* #undef HAVE_UNISTD_H */ -/* Define if you have the vprintf function. */ -#define HAVE_VPRINTF 1 - /* Define to 1 if you have the `vsnprintf' function. */ /* #undef HAVE_VSNPRINTF */ +/* Define to 1 if you have the `_stricmp' function. */ +#undef HAVE__STRICMP 1 + /* Name of package */ #define PACKAGE "yasm" diff --git a/configure.ac b/configure.ac index 7e44b42b..5aef29b8 100644 --- a/configure.ac +++ b/configure.ac @@ -94,8 +94,7 @@ AM_WITH_DMALLOC # Checks for header files. # AC_HEADER_STDC -AC_HEADER_SYS_WAIT -AC_CHECK_HEADERS([limits.h sys/param.h libgen.h unistd.h]) +AC_CHECK_HEADERS([strings.h libgen.h unistd.h direct.h]) # REQUIRE standard C headers if test "$ac_cv_header_stdc" != yes; then @@ -114,11 +113,10 @@ AX_CREATE_STDINT_H([libyasm-stdint.h]) # # Checks for library functions. # -AC_FUNC_VPRINTF -AC_CHECK_FUNCS([abort memcpy memmove strrchr toascii vsnprintf]) +AC_CHECK_FUNCS([abort toascii vsnprintf]) AC_CHECK_FUNCS([strsep mergesort getcwd]) # Look for the case-insensitive comparison functions -AC_CHECK_FUNCS([strcasecmp strncasecmp stricmp strcmpi]) +AC_CHECK_FUNCS([strcasecmp strncasecmp stricmp _stricmp strcmpi]) # # Check for gettext() and other i18n/l10n things. @@ -133,7 +131,7 @@ AH_TEMPLATE([HAVE_LC_MESSAGES], []) AH_TEMPLATE([HAVE_STPCPY], []) # Check for GNU C Library -AH_TEMPLATE([HAVE_GNU_C_LIBRARY], [Define if you have the GNU C Library]) +AH_TEMPLATE([HAVE_GNU_C_LIBRARY], [Define to 1 if you have the GNU C Library]) AC_CACHE_CHECK([for GNU C Library], yasm_cv_header_gnulib, AC_EGREP_CPP(gnulib, [#include diff --git a/libyasm/bitvect.c b/libyasm/bitvect.c index dad4826b..3fbe0b95 100644 --- a/libyasm/bitvect.c +++ b/libyasm/bitvect.c @@ -10,10 +10,8 @@ RCSID("$Id$"); /* MODULE IMPORTS: */ /*****************************************************************************/ #include /* MODULE TYPE: (sys) */ -#ifdef STDC_HEADERS #include /* MODULE TYPE: (sys) */ #include /* MODULE TYPE: (sys) */ -#endif /*****************************************************************************/ /* MODULE INTERFACE: */ /*****************************************************************************/ diff --git a/libyasm/errwarn.c b/libyasm/errwarn.c index 626ecbee..b3a59c05 100644 --- a/libyasm/errwarn.c +++ b/libyasm/errwarn.c @@ -29,10 +29,7 @@ /*@unused@*/ RCSID("$Id$"); #include - -#ifdef STDC_HEADERS -# include -#endif +#include #include "coretype.h" diff --git a/libyasm/file.c b/libyasm/file.c index 2ee3ee6f..cd2e002f 100644 --- a/libyasm/file.c +++ b/libyasm/file.c @@ -28,9 +28,9 @@ /*@unused@*/ RCSID("$Id$"); /* Need either unistd.h or direct.h (on Windows) to prototype getcwd() */ -#ifdef HAVE_UNISTD_H +#if defined(HAVE_UNISTD_H) #include -#elif defined(WIN32) || defined(_WIN32) +#elif defined(HAVE_DIRECT_H) #include #endif diff --git a/libyasm/mergesort.c b/libyasm/mergesort.c index 82fe52a0..bde5242e 100644 --- a/libyasm/mergesort.c +++ b/libyasm/mergesort.c @@ -58,10 +58,8 @@ static char sccsid[] = "@(#)merge.c 8.2 (Berkeley) 2/14/94"; * (The default is pairwise merging.) */ -#ifdef STDC_HEADERS -# include -# include -#endif +#include +#include static void setup(unsigned char *, unsigned char *, size_t, size_t, int (*)(const void *, const void *)); diff --git a/libyasm/symrec.c b/libyasm/symrec.c index bef0eaa9..a28de475 100644 --- a/libyasm/symrec.c +++ b/libyasm/symrec.c @@ -28,9 +28,7 @@ #include "util.h" /*@unused@*/ RCSID("$Id$"); -#ifdef STDC_HEADERS -# include -#endif +#include #include "libyasm-stdint.h" #include "coretype.h" diff --git a/libyasm/tests/bitvect_test.c b/libyasm/tests/bitvect_test.c index 40485262..ea8f561e 100644 --- a/libyasm/tests/bitvect_test.c +++ b/libyasm/tests/bitvect_test.c @@ -23,16 +23,9 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ -#ifdef HAVE_CONFIG_H -# include -#endif - -#ifdef STDC_HEADERS -# include -# include -#endif - #include +#include +#include #include "libyasm/bitvect.h" diff --git a/libyasm/tests/combpath_test.c b/libyasm/tests/combpath_test.c index e0edf8eb..35a5b454 100644 --- a/libyasm/tests/combpath_test.c +++ b/libyasm/tests/combpath_test.c @@ -23,16 +23,9 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ -#ifdef HAVE_CONFIG_H -# include -#endif - -#ifdef STDC_HEADERS -# include -# include -#endif - #include +#include +#include #include "libyasm/file.h" #include "libyasm/coretype.h" diff --git a/libyasm/tests/floatnum_test.c b/libyasm/tests/floatnum_test.c index 907aac98..b0526ea5 100644 --- a/libyasm/tests/floatnum_test.c +++ b/libyasm/tests/floatnum_test.c @@ -23,16 +23,9 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ -#ifdef HAVE_CONFIG_H -# include -#endif - -#ifdef STDC_HEADERS -# include -# include -#endif - #include +#include +#include #include "libyasm/floatnum.c" diff --git a/libyasm/tests/leb128_test.c b/libyasm/tests/leb128_test.c index 18ae9958..aca537b4 100644 --- a/libyasm/tests/leb128_test.c +++ b/libyasm/tests/leb128_test.c @@ -23,16 +23,9 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ -#ifdef HAVE_CONFIG_H -# include -#endif - -#ifdef STDC_HEADERS -# include -# include -#endif - #include +#include +#include #include "libyasm/intnum.c" diff --git a/libyasm/tests/splitpath_test.c b/libyasm/tests/splitpath_test.c index aada6a5d..74792636 100644 --- a/libyasm/tests/splitpath_test.c +++ b/libyasm/tests/splitpath_test.c @@ -23,16 +23,9 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ -#ifdef HAVE_CONFIG_H -# include -#endif - -#ifdef STDC_HEADERS -# include -# include -#endif - #include +#include +#include #include "libyasm/file.h" diff --git a/libyasm/tests/uncstring_test.c b/libyasm/tests/uncstring_test.c index a067858e..819c06f5 100644 --- a/libyasm/tests/uncstring_test.c +++ b/libyasm/tests/uncstring_test.c @@ -23,16 +23,9 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ -#ifdef HAVE_CONFIG_H -# include -#endif - -#ifdef STDC_HEADERS -# include -# include -#endif - #include +#include +#include #include "util.h" #include "libyasm/errwarn.h" diff --git a/modules/dbgfmts/dwarf2/dwarf2-info.c b/modules/dbgfmts/dwarf2/dwarf2-info.c index f6d2643e..433b93ef 100644 --- a/modules/dbgfmts/dwarf2/dwarf2-info.c +++ b/modules/dbgfmts/dwarf2/dwarf2-info.c @@ -28,9 +28,9 @@ /*@unused@*/ RCSID("$Id$"); /* Need either unistd.h or direct.h (on Windows) to prototype getcwd() */ -#ifdef HAVE_UNISTD_H +#if defined(HAVE_UNISTD_H) #include -#elif defined(WIN32) || defined(_WIN32) +#elif defined(HAVE_DIRECT_H) #include #endif diff --git a/modules/parsers/nasm/nasm-parse.c b/modules/parsers/nasm/nasm-parse.c index d710a61a..2943cf9c 100644 --- a/modules/parsers/nasm/nasm-parse.c +++ b/modules/parsers/nasm/nasm-parse.c @@ -31,9 +31,7 @@ RCSID("$Id$"); #define YASM_EXPR_INTERNAL #include -#ifdef STDC_HEADERS -# include -#endif +#include #include "modules/parsers/nasm/nasm-parser.h" diff --git a/util.h b/util.h index 18937812..f19792e8 100644 --- a/util.h +++ b/util.h @@ -60,6 +60,10 @@ #include #include +#ifdef HAVE_STRINGS_H +#include +#endif + #include #ifdef lint