1
0
mirror of https://gitlab.gnome.org/GNOME/libxslt synced 2025-07-29 15:41:13 +03:00

Don't check for standard C89 headers

Also stop including non-standard headers.
This commit is contained in:
Nick Wellnhofer
2022-03-31 01:04:38 +02:00
parent 25652d85fd
commit dd16508642
17 changed files with 12 additions and 247 deletions

View File

@ -93,26 +93,19 @@ else()
set(CMAKE_REQUIRED_LIBRARIES m) set(CMAKE_REQUIRED_LIBRARIES m)
endif() endif()
check_function_exists(clock_gettime HAVE_CLOCK_GETTIME) check_function_exists(clock_gettime HAVE_CLOCK_GETTIME)
check_include_files(dlfcn.h HAVE_DLFCN_H)
check_function_exists(fabs HAVE_FABS) check_function_exists(fabs HAVE_FABS)
check_include_files(float.h HAVE_FLOAT_H)
check_function_exists(floor HAVE_FLOOR) check_function_exists(floor HAVE_FLOOR)
check_function_exists(fprintf HAVE_FPRINTF) check_function_exists(fprintf HAVE_FPRINTF)
check_include_files(fp_class.h HAVE_FP_CLASS_H)
check_function_exists(ftime HAVE_FTIME) check_function_exists(ftime HAVE_FTIME)
check_library_exists(gcrypt gcry_control "gcrypt.h" HAVE_GCRYPT) check_library_exists(gcrypt gcry_control "gcrypt.h" HAVE_GCRYPT)
check_function_exists(gettimeofday HAVE_GETTIMEOFDAY) check_function_exists(gettimeofday HAVE_GETTIMEOFDAY)
check_function_exists(gmtime HAVE_GMTIME) check_function_exists(gmtime HAVE_GMTIME)
check_function_exists(gmtime_r HAVE_GMTIME_R) check_function_exists(gmtime_r HAVE_GMTIME_R)
check_include_files(ieeefp.h HAVE_IEEEFP_H)
check_include_files(inttypes.h HAVE_INTTYPES_H) check_include_files(inttypes.h HAVE_INTTYPES_H)
check_library_exists(pthread pthread_join "" HAVE_LIBPTHREAD) check_library_exists(pthread pthread_join "" HAVE_LIBPTHREAD)
check_include_files(locale.h HAVE_LOCALE_H) check_include_files(locale.h HAVE_LOCALE_H)
check_function_exists(localtime HAVE_LOCALTIME) check_function_exists(localtime HAVE_LOCALTIME)
check_function_exists(localtime_r HAVE_LOCALTIME_R) check_function_exists(localtime_r HAVE_LOCALTIME_R)
check_include_files(math.h HAVE_MATH_H)
check_include_files(memory.h HAVE_MEMORY_H)
check_include_files(nan.h HAVE_NAN_H)
check_function_exists(pow HAVE_POW) check_function_exists(pow HAVE_POW)
check_function_exists(printf HAVE_PRINTF) check_function_exists(printf HAVE_PRINTF)
check_include_files(pthread.h HAVE_PTHREAD_H) check_include_files(pthread.h HAVE_PTHREAD_H)
@ -120,11 +113,6 @@ else()
check_function_exists(sprintf HAVE_SPRINTF) check_function_exists(sprintf HAVE_SPRINTF)
check_function_exists(sscanf HAVE_SSCANF) check_function_exists(sscanf HAVE_SSCANF)
check_function_exists(stat HAVE_STAT) check_function_exists(stat HAVE_STAT)
check_include_files(stdarg.h HAVE_STDARG_H)
check_include_files(stdint.h HAVE_STDINT_H)
check_include_files(stdlib.h HAVE_STDLIB_H)
check_include_files(strings.h HAVE_STRINGS_H)
check_include_files(string.h HAVE_STRING_H)
check_function_exists(strxfrm_l HAVE_STRXFRM_L) check_function_exists(strxfrm_l HAVE_STRXFRM_L)
check_include_files(sys/select.h HAVE_SYS_SELECT_H) check_include_files(sys/select.h HAVE_SYS_SELECT_H)
check_include_files(sys/stat.h HAVE_SYS_STAT_H) check_include_files(sys/stat.h HAVE_SYS_STAT_H)
@ -132,7 +120,6 @@ else()
check_include_files(sys/time.h HAVE_SYS_TIME_H) check_include_files(sys/time.h HAVE_SYS_TIME_H)
check_include_files(sys/types.h HAVE_SYS_TYPES_H) check_include_files(sys/types.h HAVE_SYS_TYPES_H)
check_function_exists(time HAVE_TIME) check_function_exists(time HAVE_TIME)
check_include_files(time.h HAVE_TIME_H)
check_include_files(unistd.h HAVE_UNISTD_H) check_include_files(unistd.h HAVE_UNISTD_H)
check_function_exists(vfprintf HAVE_VFPRINTF) check_function_exists(vfprintf HAVE_VFPRINTF)
check_function_exists(vsnprintf HAVE_VSNPRINTF) check_function_exists(vsnprintf HAVE_VSNPRINTF)
@ -147,7 +134,6 @@ else()
set(PACKAGE_TARNAME "libxslt") set(PACKAGE_TARNAME "libxslt")
set(PACKAGE_URL "https://gitlab.gnome.org/GNOME/libxslt") set(PACKAGE_URL "https://gitlab.gnome.org/GNOME/libxslt")
set(PACKAGE_VERSION ${LIBXSLT_DOTTED_VERSION}) set(PACKAGE_VERSION ${LIBXSLT_DOTTED_VERSION})
check_include_files("float.h;stdarg.h;stdlib.h;string.h" STDC_HEADERS)
set(_ALL_SOURCE ON) set(_ALL_SOURCE ON)
set(_GNU_SOURCE ON) set(_GNU_SOURCE ON)
set(_POSIX_PTHREAD_SEMANTICS ON) set(_POSIX_PTHREAD_SEMANTICS ON)

View File

@ -4,27 +4,15 @@
/* Define to 1 if you have the `clock_gettime' function. */ /* Define to 1 if you have the `clock_gettime' function. */
#cmakedefine HAVE_CLOCK_GETTIME 1 #cmakedefine HAVE_CLOCK_GETTIME 1
/* Define to 1 if you have the <dlfcn.h> header file. */
#cmakedefine HAVE_DLFCN_H 1
/* Define to 1 if you have the <errno.h> header file. */
#cmakedefine HAVE_ERRNO_H 1
/* Define if fabs is there */ /* Define if fabs is there */
#cmakedefine HAVE_FABS #cmakedefine HAVE_FABS
/* Define to 1 if you have the <float.h> header file. */
#cmakedefine HAVE_FLOAT_H 1
/* Define if floor is there */ /* Define if floor is there */
#cmakedefine HAVE_FLOOR #cmakedefine HAVE_FLOOR
/* Define to 1 if you have the `fprintf' function. */ /* Define to 1 if you have the `fprintf' function. */
#cmakedefine HAVE_FPRINTF 1 #cmakedefine HAVE_FPRINTF 1
/* Define to 1 if you have the <fp_class.h> header file. */
#cmakedefine HAVE_FP_CLASS_H 1
/* Define to 1 if you have the `ftime' function. */ /* Define to 1 if you have the `ftime' function. */
#cmakedefine HAVE_FTIME 1 #cmakedefine HAVE_FTIME 1
@ -40,9 +28,6 @@
/* Define to 1 if you have the `gmtime_r' function. */ /* Define to 1 if you have the `gmtime_r' function. */
#cmakedefine HAVE_GMTIME_R 1 #cmakedefine HAVE_GMTIME_R 1
/* Define to 1 if you have the <ieeefp.h> header file. */
#cmakedefine HAVE_IEEEFP_H 1
/* Define to 1 if you have the <inttypes.h> header file. */ /* Define to 1 if you have the <inttypes.h> header file. */
#cmakedefine HAVE_INTTYPES_H 1 #cmakedefine HAVE_INTTYPES_H 1
@ -58,15 +43,6 @@
/* Define to 1 if you have the `localtime_r' function. */ /* Define to 1 if you have the `localtime_r' function. */
#cmakedefine HAVE_LOCALTIME_R 1 #cmakedefine HAVE_LOCALTIME_R 1
/* Define to 1 if you have the <math.h> header file. */
#cmakedefine HAVE_MATH_H 1
/* Define to 1 if you have the <memory.h> header file. */
#cmakedefine HAVE_MEMORY_H 1
/* Define to 1 if you have the <nan.h> header file. */
#cmakedefine HAVE_NAN_H 1
/* Define if pow is there */ /* Define if pow is there */
#cmakedefine HAVE_POW #cmakedefine HAVE_POW
@ -88,21 +64,6 @@
/* Define to 1 if you have the `stat' function. */ /* Define to 1 if you have the `stat' function. */
#cmakedefine HAVE_STAT 1 #cmakedefine HAVE_STAT 1
/* Define to 1 if you have the <stdarg.h> header file. */
#cmakedefine HAVE_STDARG_H 1
/* Define to 1 if you have the <stdint.h> header file. */
#cmakedefine HAVE_STDINT_H 1
/* Define to 1 if you have the <stdlib.h> header file. */
#cmakedefine HAVE_STDLIB_H 1
/* Define to 1 if you have the <strings.h> header file. */
#cmakedefine HAVE_STRINGS_H 1
/* Define to 1 if you have the <string.h> header file. */
#cmakedefine HAVE_STRING_H 1
/* Define to 1 if you have the `strxfrm_l' function. */ /* Define to 1 if you have the `strxfrm_l' function. */
#cmakedefine HAVE_STRXFRM_L 1 #cmakedefine HAVE_STRXFRM_L 1
@ -124,9 +85,6 @@
/* Define to 1 if you have the `time' function. */ /* Define to 1 if you have the `time' function. */
#cmakedefine HAVE_TIME 1 #cmakedefine HAVE_TIME 1
/* Define to 1 if you have the <time.h> header file. */
#cmakedefine HAVE_TIME_H 1
/* Define to 1 if you have the <unistd.h> header file. */ /* Define to 1 if you have the <unistd.h> header file. */
#cmakedefine HAVE_UNISTD_H 1 #cmakedefine HAVE_UNISTD_H 1
@ -169,9 +127,6 @@
/* Define to the version of this package. */ /* Define to the version of this package. */
#cmakedefine PACKAGE_VERSION "@PACKAGE_VERSION@" #cmakedefine PACKAGE_VERSION "@PACKAGE_VERSION@"
/* Define to 1 if you have the ANSI C header files. */
#cmakedefine STDC_HEADERS 1
/* Enable extensions on AIX 3, Interix. */ /* Enable extensions on AIX 3, Interix. */
#ifndef _ALL_SOURCE #ifndef _ALL_SOURCE
#cmakedefine _ALL_SOURCE 1 #cmakedefine _ALL_SOURCE 1

View File

@ -89,7 +89,7 @@ PKG_PROG_PKG_CONFIG
LT_INIT(win32-dll) LT_INIT(win32-dll)
AC_CHECK_HEADERS(sys/types.h sys/time.h stdlib.h unistd.h string.h) AC_CHECK_HEADERS(sys/types.h sys/time.h unistd.h)
dnl dnl
dnl if the system support linker version scripts for symbol versioning dnl if the system support linker version scripts for symbol versioning
@ -135,9 +135,7 @@ dnl
dnl Math detection dnl Math detection
dnl dnl
AC_CHECK_HEADERS(ieeefp.h nan.h math.h fp_class.h float.h) AC_CHECK_HEADERS(sys/timeb.h sys/stat.h sys/select.h)
AC_CHECK_HEADERS(sys/timeb.h time.h sys/stat.h sys/select.h stdarg.h)
AC_CHECK_HEADERS(errno.h)
AC_CHECK_FUNCS(stat _stat) AC_CHECK_FUNCS(stat _stat)
AC_CHECK_FUNC(pow, , AC_CHECK_LIB(m, pow, AC_CHECK_FUNC(pow, , AC_CHECK_LIB(m, pow,
[M_LIBS="-lm"; AC_DEFINE([HAVE_POW],[], [Define if pow is there])])) [M_LIBS="-lm"; AC_DEFINE([HAVE_POW],[], [Define if pow is there])]))

View File

@ -315,9 +315,6 @@ exsltCryptoCryptoApiRc4Decrypt (xmlXPathParserContextPtr ctxt,
#ifdef HAVE_SYS_TYPES_H #ifdef HAVE_SYS_TYPES_H
# include <sys/types.h> # include <sys/types.h>
#endif #endif
#ifdef HAVE_STDINT_H
# include <stdint.h>
#endif
#ifdef HAVE_SYS_SELECT_H #ifdef HAVE_SYS_SELECT_H
#include <sys/select.h> /* needed by gcrypt.h 4 Jul 04 */ #include <sys/select.h> /* needed by gcrypt.h 4 Jul 04 */

View File

@ -40,13 +40,8 @@
#include <string.h> #include <string.h>
#include <limits.h> #include <limits.h>
#ifdef HAVE_ERRNO_H
#include <errno.h> #include <errno.h>
#endif
#ifdef HAVE_MATH_H
#include <math.h> #include <math.h>
#endif
/* needed to get localtime_r on Solaris */ /* needed to get localtime_r on Solaris */
#ifdef __sun #ifdef __sun
@ -55,9 +50,7 @@
#endif #endif
#endif #endif
#ifdef HAVE_TIME_H
#include <time.h> #include <time.h>
#endif
/* /*
* types of date and/or time (from schema datatypes) * types of date and/or time (from schema datatypes)
@ -107,8 +100,7 @@ struct _exsltDateDurVal {
* * * *
****************************************************************/ ****************************************************************/
#if defined(HAVE_TIME_H) \ #if (defined(HAVE_LOCALTIME) || defined(HAVE_LOCALTIME_R)) \
&& (defined(HAVE_LOCALTIME) || defined(HAVE_LOCALTIME_R)) \
&& (defined(HAVE_GMTIME) || defined(HAVE_GMTIME_R)) \ && (defined(HAVE_GMTIME) || defined(HAVE_GMTIME_R)) \
&& defined(HAVE_TIME) && defined(HAVE_TIME)
#define WITH_TIME #define WITH_TIME
@ -745,16 +737,13 @@ exsltDateCurrent (void)
time_t secs; time_t secs;
int local_s, gm_s; int local_s, gm_s;
exsltDateValPtr ret; exsltDateValPtr ret;
#ifdef HAVE_ERRNO_H
char *source_date_epoch; char *source_date_epoch;
#endif /* HAVE_ERRNO_H */
int override = 0; int override = 0;
ret = exsltDateCreateDate(XS_DATETIME); ret = exsltDateCreateDate(XS_DATETIME);
if (ret == NULL) if (ret == NULL)
return NULL; return NULL;
#ifdef HAVE_ERRNO_H
/* /*
* Allow the date and time to be set externally by an exported * Allow the date and time to be set externally by an exported
* environment variable to enable reproducible builds. * environment variable to enable reproducible builds.
@ -776,7 +765,6 @@ exsltDateCurrent (void)
#endif #endif
} }
} }
#endif /* HAVE_ERRNO_H */
if (override == 0) { if (override == 0) {
/* get current time */ /* get current time */

View File

@ -9,13 +9,8 @@
#include <libxslt/xsltInternals.h> #include <libxslt/xsltInternals.h>
#include <libxslt/extensions.h> #include <libxslt/extensions.h>
#ifdef HAVE_MATH_H
#include <math.h> #include <math.h>
#endif
#ifdef HAVE_STDLIB_H
#include <stdlib.h> #include <stdlib.h>
#endif
#include "exslt.h" #include "exslt.h"
@ -453,8 +448,6 @@ exsltMathConstantFunction (xmlXPathParserContextPtr ctxt, int nargs) {
xmlXPathReturnNumber(ctxt, ret); xmlXPathReturnNumber(ctxt, ret);
} }
#if defined(HAVE_STDLIB_H) && defined(RAND_MAX)
/** /**
* exsltMathRandom: * exsltMathRandom:
* *
@ -494,10 +487,6 @@ exsltMathRandomFunction (xmlXPathParserContextPtr ctxt, int nargs) {
xmlXPathReturnNumber(ctxt, ret); xmlXPathReturnNumber(ctxt, ret);
} }
#endif /* defined(HAVE_STDLIB_H) && defined(RAND_MAX) */
#if HAVE_MATH_H
/** /**
* exsltMathAbs: * exsltMathAbs:
* @num: a double * @num: a double
@ -1029,8 +1018,6 @@ exsltMathExpFunction (xmlXPathParserContextPtr ctxt, int nargs) {
xmlXPathReturnNumber(ctxt, ret); xmlXPathReturnNumber(ctxt, ret);
} }
#endif /* HAVE_MATH_H */
/** /**
* exsltMathRegister: * exsltMathRegister:
* *
@ -1051,16 +1038,12 @@ exsltMathRegister (void) {
xsltRegisterExtModuleFunction ((const xmlChar *) "lowest", xsltRegisterExtModuleFunction ((const xmlChar *) "lowest",
EXSLT_MATH_NAMESPACE, EXSLT_MATH_NAMESPACE,
exsltMathLowestFunction); exsltMathLowestFunction);
/* register other math functions */
xsltRegisterExtModuleFunction ((const xmlChar *) "constant", xsltRegisterExtModuleFunction ((const xmlChar *) "constant",
EXSLT_MATH_NAMESPACE, EXSLT_MATH_NAMESPACE,
exsltMathConstantFunction); exsltMathConstantFunction);
#ifdef HAVE_STDLIB_H
xsltRegisterExtModuleFunction ((const xmlChar *) "random", xsltRegisterExtModuleFunction ((const xmlChar *) "random",
EXSLT_MATH_NAMESPACE, EXSLT_MATH_NAMESPACE,
exsltMathRandomFunction); exsltMathRandomFunction);
#endif
#if HAVE_MATH_H
xsltRegisterExtModuleFunction ((const xmlChar *) "abs", xsltRegisterExtModuleFunction ((const xmlChar *) "abs",
EXSLT_MATH_NAMESPACE, EXSLT_MATH_NAMESPACE,
exsltMathAbsFunction); exsltMathAbsFunction);
@ -1097,7 +1080,6 @@ exsltMathRegister (void) {
xsltRegisterExtModuleFunction ((const xmlChar *) "exp", xsltRegisterExtModuleFunction ((const xmlChar *) "exp",
EXSLT_MATH_NAMESPACE, EXSLT_MATH_NAMESPACE,
exsltMathExpFunction); exsltMathExpFunction);
#endif
} }
/** /**
@ -1129,13 +1111,10 @@ exsltMathXpathCtxtRegister (xmlXPathContextPtr ctxt, const xmlChar *prefix)
(const xmlChar *) "lowest", (const xmlChar *) "lowest",
(const xmlChar *) EXSLT_MATH_NAMESPACE, (const xmlChar *) EXSLT_MATH_NAMESPACE,
exsltMathLowestFunction) exsltMathLowestFunction)
#ifdef HAVE_STDLIB_H
&& !xmlXPathRegisterFuncNS(ctxt, && !xmlXPathRegisterFuncNS(ctxt,
(const xmlChar *) "random", (const xmlChar *) "random",
(const xmlChar *) EXSLT_MATH_NAMESPACE, (const xmlChar *) EXSLT_MATH_NAMESPACE,
exsltMathRandomFunction) exsltMathRandomFunction)
#endif
#if HAVE_MATH_H
&& !xmlXPathRegisterFuncNS(ctxt, && !xmlXPathRegisterFuncNS(ctxt,
(const xmlChar *) "abs", (const xmlChar *) "abs",
(const xmlChar *) EXSLT_MATH_NAMESPACE, (const xmlChar *) EXSLT_MATH_NAMESPACE,
@ -1184,7 +1163,6 @@ exsltMathXpathCtxtRegister (xmlXPathContextPtr ctxt, const xmlChar *prefix)
(const xmlChar *) "exp", (const xmlChar *) "exp",
(const xmlChar *) EXSLT_MATH_NAMESPACE, (const xmlChar *) EXSLT_MATH_NAMESPACE,
exsltMathExpFunction) exsltMathExpFunction)
#endif
&& !xmlXPathRegisterFuncNS(ctxt, && !xmlXPathRegisterFuncNS(ctxt,
(const xmlChar *) "constant", (const xmlChar *) "constant",
(const xmlChar *) EXSLT_MATH_NAMESPACE, (const xmlChar *) EXSLT_MATH_NAMESPACE,

View File

@ -14,25 +14,6 @@
#include <string.h> #include <string.h>
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#ifdef HAVE_MATH_H
#include <math.h>
#endif
#ifdef HAVE_FLOAT_H
#include <float.h>
#endif
#ifdef HAVE_IEEEFP_H
#include <ieeefp.h>
#endif
#ifdef HAVE_NAN_H
#include <nan.h>
#endif
#ifdef HAVE_CTYPE_H
#include <ctype.h>
#endif
#include <libxml/xmlmemory.h> #include <libxml/xmlmemory.h>
#include <libxml/tree.h> #include <libxml/tree.h>
#include <libxml/hash.h> #include <libxml/hash.h>

View File

@ -14,9 +14,7 @@
#include "libxslt.h" #include "libxslt.h"
#include <string.h> #include <string.h>
#ifdef HAVE_STDLIB_H
#include <stdlib.h> #include <stdlib.h>
#endif
#include <libxml/xmlmemory.h> #include <libxml/xmlmemory.h>
#include <libxml/tree.h> #include <libxml/tree.h>

View File

@ -15,13 +15,6 @@
#include <string.h> #include <string.h>
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#ifdef HAVE_CTYPE_H
#include <ctype.h>
#endif
#include <libxml/xmlmemory.h> #include <libxml/xmlmemory.h>
#include <libxml/parser.h> #include <libxml/parser.h>
#include <libxml/tree.h> #include <libxml/tree.h>

View File

@ -14,25 +14,6 @@
#include <string.h> #include <string.h>
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#ifdef HAVE_MATH_H
#include <math.h>
#endif
#ifdef HAVE_FLOAT_H
#include <float.h>
#endif
#ifdef HAVE_IEEEFP_H
#include <ieeefp.h>
#endif
#ifdef HAVE_NAN_H
#include <nan.h>
#endif
#ifdef HAVE_CTYPE_H
#include <ctype.h>
#endif
#include <libxml/xmlmemory.h> #include <libxml/xmlmemory.h>
#include <libxml/tree.h> #include <libxml/tree.h>
#include <libxml/hash.h> #include <libxml/hash.h>

View File

@ -14,24 +14,6 @@
#include <string.h> #include <string.h>
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#ifdef HAVE_MATH_H
#include <math.h>
#endif
#ifdef HAVE_FLOAT_H
#include <float.h>
#endif
#ifdef HAVE_IEEEFP_H
#include <ieeefp.h>
#endif
#ifdef HAVE_NAN_H
#include <nan.h>
#endif
#ifdef HAVE_CTYPE_H
#include <ctype.h>
#endif
#ifndef XSLT_NEED_TRIO #ifndef XSLT_NEED_TRIO
#include <stdio.h> #include <stdio.h>
#else #else

View File

@ -18,22 +18,6 @@
#include <sys/stat.h> #include <sys/stat.h>
#endif #endif
#ifdef HAVE_MATH_H
#include <math.h>
#endif
#ifdef HAVE_FLOAT_H
#include <float.h>
#endif
#ifdef HAVE_IEEEFP_H
#include <ieeefp.h>
#endif
#ifdef HAVE_NAN_H
#include <nan.h>
#endif
#ifdef HAVE_CTYPE_H
#include <ctype.h>
#endif
#if defined(_WIN32) && !defined(__CYGWIN__) #if defined(_WIN32) && !defined(__CYGWIN__)
#include <windows.h> #include <windows.h>
#ifndef INVALID_FILE_ATTRIBUTES #ifndef INVALID_FILE_ATTRIBUTES

View File

@ -9,15 +9,9 @@
#ifndef __LIBXSLT_WIN32_CONFIG__ #ifndef __LIBXSLT_WIN32_CONFIG__
#define __LIBXSLT_WIN32_CONFIG__ #define __LIBXSLT_WIN32_CONFIG__
#define HAVE_CTYPE_H 1
#define HAVE_STDLIB_H 1
#define HAVE_STDARG_H 1
#define HAVE_MALLOC_H 1
#define HAVE_TIME_H 1
#define HAVE_LOCALTIME 1 #define HAVE_LOCALTIME 1
#define HAVE_GMTIME 1 #define HAVE_GMTIME 1
#define HAVE_TIME 1 #define HAVE_TIME 1
#define HAVE_MATH_H 1
#define HAVE_FCNTL_H 1 #define HAVE_FCNTL_H 1
#include <io.h> #include <io.h>
@ -115,7 +109,6 @@ __inline int c99_snprintf(char *outBuf, size_t size, const char *format, ...)
#define HAVE_SYS_STAT_H #define HAVE_SYS_STAT_H
#define HAVE__STAT #define HAVE__STAT
#define HAVE_STRING_H
#include <libxml/xmlversion.h> #include <libxml/xmlversion.h>

View File

@ -86,7 +86,6 @@ extern "C" {
#define XSLT_NEED_TRIO #define XSLT_NEED_TRIO
#endif #endif
#ifdef __VMS #ifdef __VMS
#define HAVE_MATH_H 1
#define HAVE_SYS_STAT_H 1 #define HAVE_SYS_STAT_H 1
#ifndef XSLT_NEED_TRIO #ifndef XSLT_NEED_TRIO
#define XSLT_NEED_TRIO #define XSLT_NEED_TRIO

View File

@ -19,17 +19,16 @@
#endif #endif
#include <string.h> #include <string.h>
#include <stdlib.h>
#include <stdarg.h>
#include <time.h> #include <time.h>
#ifdef HAVE_SYS_TIME_H #ifdef HAVE_SYS_TIME_H
#include <sys/time.h> #include <sys/time.h>
#endif #endif
#ifdef HAVE_UNISTD_H #ifdef HAVE_UNISTD_H
#include <unistd.h> #include <unistd.h>
#endif #endif
#ifdef HAVE_STDLIB_H
#include <stdlib.h>
#endif
#include <stdarg.h>
#include <libxml/xmlmemory.h> #include <libxml/xmlmemory.h>
#include <libxml/tree.h> #include <libxml/tree.h>

View File

@ -13,9 +13,6 @@
#define __XML_XSLTUTILS_H__ #define __XML_XSLTUTILS_H__
#include <libxslt/xsltconfig.h> #include <libxslt/xsltconfig.h>
#ifdef HAVE_STDARG_H
#include <stdarg.h>
#endif
#include <libxml/xpath.h> #include <libxml/xpath.h>
#include <libxml/dict.h> #include <libxml/dict.h>
#include <libxml/xmlerror.h> #include <libxml/xmlerror.h>

View File

@ -9,28 +9,22 @@
#include "libxslt/libxslt.h" #include "libxslt/libxslt.h"
#include "libxslt/xsltconfig.h" #include "libxslt/xsltconfig.h"
#include "libexslt/exslt.h" #include "libexslt/exslt.h"
#include <stdio.h> #include <stdio.h>
#ifdef HAVE_STRING_H
#include <string.h> #include <string.h>
#endif #include <stdlib.h>
#include <stdarg.h>
#include <time.h>
#ifdef HAVE_SYS_TIME_H #ifdef HAVE_SYS_TIME_H
#include <sys/time.h> #include <sys/time.h>
#endif #endif
#ifdef HAVE_TIME_H
#include <time.h>
#endif
#ifdef HAVE_SYS_STAT_H #ifdef HAVE_SYS_STAT_H
#include <sys/stat.h> #include <sys/stat.h>
#endif #endif
#ifdef HAVE_UNISTD_H #ifdef HAVE_UNISTD_H
#include <unistd.h> #include <unistd.h>
#endif #endif
#ifdef HAVE_STDLIB_H
#include <stdlib.h>
#endif
#ifdef HAVE_STDARG_H
#include <stdarg.h>
#endif
#if defined(_WIN32) && !defined(__CYGWIN__) #if defined(_WIN32) && !defined(__CYGWIN__)
#include <fcntl.h> #include <fcntl.h>
#endif #endif
@ -57,12 +51,6 @@
#include <libexslt/exsltconfig.h> #include <libexslt/exsltconfig.h>
#if defined(HAVE_SYS_TIME_H)
#include <sys/time.h>
#elif defined(HAVE_TIME_H)
#include <time.h>
#endif
#ifdef HAVE_SYS_TIMEB_H #ifdef HAVE_SYS_TIMEB_H
#include <sys/timeb.h> #include <sys/timeb.h>
#endif #endif
@ -265,16 +253,13 @@ static void endTimer(const char *format, ...)
msec *= 1000; msec *= 1000;
msec += (endtime.tv_usec - begin.tv_usec) / 1000; msec += (endtime.tv_usec - begin.tv_usec) / 1000;
#ifndef HAVE_STDARG_H
#error "endTimer required stdarg functions"
#endif
va_start(ap, format); va_start(ap, format);
vfprintf(stderr,format,ap); vfprintf(stderr,format,ap);
va_end(ap); va_end(ap);
fprintf(stderr, " took %ld ms\n", msec); fprintf(stderr, " took %ld ms\n", msec);
} }
#elif defined(HAVE_TIME_H) #else
/* /*
* No gettimeofday function, so we have to make do with calling clock. * No gettimeofday function, so we have to make do with calling clock.
* This is obviously less accurate, but there's little we can do about * This is obviously less accurate, but there's little we can do about
@ -297,40 +282,11 @@ static void endTimer(const char *format, ...)
endtime=clock(); endtime=clock();
msec = ((endtime-begin) * 1000) / CLOCKS_PER_SEC; msec = ((endtime-begin) * 1000) / CLOCKS_PER_SEC;
#ifndef HAVE_STDARG_H
#error "endTimer required stdarg functions"
#endif
va_start(ap, format); va_start(ap, format);
vfprintf(stderr,format,ap); vfprintf(stderr,format,ap);
va_end(ap); va_end(ap);
fprintf(stderr, " took %ld ms\n", msec); fprintf(stderr, " took %ld ms\n", msec);
} }
#else
/*
* We don't have a gettimeofday or time.h, so we just don't do timing
*/
static void startTimer(void)
{
/*
* Do nothing
*/
}
static void endTimer(const char *format, ...)
{
/*
* We cannot do anything because we don't have a timing function
*/
#ifdef HAVE_STDARG_H
va_start(ap, format);
vfprintf(stderr,format,ap);
va_end(ap);
fprintf(stderr, " was not timed\n");
#else
/* We don't have gettimeofday, time or stdarg.h, what crazy world is
* this ?!
*/
#endif
}
#endif #endif
/* /*