use autoconf when not MSCVER or GLIBC

This commit is contained in:
Enno Rehling 2016-11-25 21:12:14 +01:00
parent e52cf75c59
commit 0208304b07
3 changed files with 6 additions and 130 deletions

View file

@ -33,127 +33,4 @@
#cmakedefine HAVE_DIRECT_MKDIR 1
#cmakedefine HAVE_DIRECT__MKDIR 1
#if defined(HAVE_STRINGS_H)
#include <strings.h>
#endif
#if defined(HAVE_UNISTD_H)
#include <unistd.h>
#endif
#if defined(HAVE_IO_H)
#include <io.h>
#endif
#if defined(HAVE_WINDOWS_H)
#include <windows.h>
#endif
#if defined(HAVE_STDBOOL_H)
# include <stdbool.h>
#else
# if ! HAVE__BOOL
# ifdef __cplusplus
typedef bool _Bool;
# else
typedef unsigned char _Bool;
# endif
# endif
# define bool _Bool
# define false 0
# define true 1
# define __bool_true_false_are_defined 1
#endif
#ifndef HAVE__ACCESS
#ifdef HAVE_ACCESS
#define _access(path, mode) access(path, mode)
#endif
#endif
#ifndef _A_RDONLY
#ifdef R_OK
#define _A_RDONLY R_OK
#endif
#endif
#if !defined(HAVE__MEMICMP)
#if defined(HAVE_MEMICMP)
#define _memicmp(a, b, n) memicmp(a, b, n)
#elif defined(HAVE_STRNCASECMP)
#define _memicmp(a, b, n) strncasecmp(a, b, n)
#else
#define _memicmp(a, b, n) lcp_memicmp(a, b, n)
#endif
#endif
#if !defined(HAVE__STRCMPL)
#if defined(HAVE_STRCMPL)
#define _strcmpl(a, b) strcmpl(a, b)
#elif defined(HAVE__STRICMP)
#define _strcmpl(a, b) _stricmp(a, b)
#elif defined(HAVE_STRICMP)
#define _strcmpl(a, b) stricmp(a, b)
#elif defined(HAVE_STRCASECMP)
#define _strcmpl(a, b) strcasecmp(a, b)
#else
#define _strcmpl(a, b) lcp_strcmpl(a, b)
#endif
#endif
#if defined(HAVE_DIRECT__MKDIR)
#include <direct.h>
#elif defined(HAVE_DIRECT_MKDIR)
#include <direct.h>
#define _mkdir(a) mkdir(a)
#elif defined(HAVE_SYS_STAT_MKDIR)
#include <sys/stat.h>
#define _mkdir(a) mkdir(a, 0777)
#endif
#if !defined(HAVE__STRLWR)
#if defined(HAVE_STRLWR)
#define _strlwr(a) strlwr(a)
#else
#define _strlwr(a) lcp_strlwr(a)
#endif
#endif
#if !defined(HAVE__STRDUP)
#if defined(HAVE_STRDUP)
#define _strdup(a) strdup(a)
#else
#define _strdup(a) lcp_strdup(a)
#endif
#endif
#if !defined(HAVE__SLEEP)
#if defined(HAVE_USLEEP)
#define _sleep(a) usleep(a)
#elif defined(HAVE_SLEEP)
#define _sleep(a) sleep((a)/1000)
#else
#define _sleep(a) lcp_sleep(a)
#endif
#endif
#if !defined(HAVE__SNPRINTF)
#if defined(HAVE_SNPRINTF)
#define _snprintf snprintf
#else
#define _snprintf lcp_snprintf
#endif
#endif
#ifndef _min
#define _min(a,b) ((a) < (b) ? (a) : (b))
#endif
#ifndef _max
#define _max(a,b) ((a) > (b) ? (a) : (b))
#endif
#if !defined(DBG_UNREFERENCED_PARAMETER)
#define DBG_UNREFERENCED_PARAMETER(x) x
#endif
#endif

View file

@ -78,9 +78,8 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
# define _CRTDBG_MAP_ALLOC
#endif
#endif /* _MSC_VER_ */
#if defined __GNUC__
#elif defined __GLIBC__
#error gnuc
# define _POSIX_C_SOURCE 200809L
# undef _DEFAULT_SOURCE
# define _DEFAULT_SOURCE
@ -90,12 +89,12 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
# define HAVE_SYS_STAT_MKDIR
# define HAVE_STRDUP
# define HAVE_UNISTD_H
#endif
#ifdef SOLARIS
#elif defined SOLARIS
# define _SYS_PROCSET_H
#undef _XOPEN_SOURCE
# define _XOPEN_SOURCE
#else
#include <autoconf.h>
#endif
#define unused_arg (void)

@ -1 +1 @@
Subproject commit 18cc3bb8f8906237915eb31c9899f95340318087
Subproject commit 2117191d4ad75e1eb14809878bc71d15b20a5d86