2014-03-15 19:29:11 +01:00
|
|
|
#pragma once
|
|
|
|
#ifndef CMAKE_AUTOCONF_H
|
|
|
|
#define CMAKE_AUTOCONF_H
|
|
|
|
#cmakedefine HAVE_STDBOOL_H 1
|
|
|
|
#cmakedefine HAVE_STRINGS_H 1
|
|
|
|
#cmakedefine HAVE_WINDOWS_H 1
|
2014-03-15 20:35:20 +01:00
|
|
|
#cmakedefine HAVE_IO_H 1
|
2014-03-15 19:29:11 +01:00
|
|
|
#cmakedefine HAVE_UNISTD_H 1
|
|
|
|
#cmakedefine HAVE__BOOL 1
|
|
|
|
#cmakedefine HAVE_STRCASECMP 1
|
|
|
|
#cmakedefine HAVE_STRNCASECMP 1
|
|
|
|
#cmakedefine HAVE__STRICMP 1
|
|
|
|
#cmakedefine HAVE_SNPRINTF 1
|
|
|
|
#cmakedefine HAVE__SNPRINTF 1
|
2014-03-15 21:18:36 +01:00
|
|
|
#cmakedefine HAVE_ACCESS 1
|
|
|
|
#cmakedefine HAVE__ACCESS 1
|
2014-03-15 19:29:11 +01:00
|
|
|
#cmakedefine HAVE_SLEEP 1
|
|
|
|
#cmakedefine HAVE_USLEEP 1
|
|
|
|
#cmakedefine HAVE__SLEEP 1
|
|
|
|
#cmakedefine HAVE_STRDUP 1
|
|
|
|
#cmakedefine HAVE__STRDUP 1
|
|
|
|
#cmakedefine HAVE_STRICMP 1
|
|
|
|
#cmakedefine HAVE__STRCMPL 1
|
|
|
|
#cmakedefine HAVE_STRCMPL 1
|
|
|
|
#cmakedefine HAVE__MEMICMP 1
|
|
|
|
#cmakedefine HAVE_MEMICMP 1
|
|
|
|
#cmakedefine HAVE__STRLWR 1
|
|
|
|
#cmakedefine HAVE_STRLWR 1
|
2015-03-03 07:04:04 +01:00
|
|
|
#cmakedefine HAVE_STRLCPY 1
|
|
|
|
#cmakedefine HAVE_STRLCAT 1
|
|
|
|
#cmakedefine HAVE_SLPRINTF 1
|
2014-03-15 19:29:11 +01:00
|
|
|
#cmakedefine HAVE_SYS_STAT_MKDIR 1
|
|
|
|
#cmakedefine HAVE_DIRECT_MKDIR 1
|
|
|
|
#cmakedefine HAVE_DIRECT__MKDIR 1
|
|
|
|
|
|
|
|
#if defined(HAVE_STRINGS_H)
|
|
|
|
#include <strings.h>
|
|
|
|
#endif
|
|
|
|
|
2014-03-16 06:24:18 +01:00
|
|
|
#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
|
|
|
|
|
2014-03-15 21:18:36 +01:00
|
|
|
#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
|
|
|
|
|
2014-03-15 19:29:11 +01:00
|
|
|
#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
|
|
|
|
|
2014-03-16 05:03:17 +01:00
|
|
|
#ifndef _min
|
|
|
|
#define _min(a,b) ((a) < (b) ? (a) : (b))
|
2014-03-15 19:29:11 +01:00
|
|
|
#endif
|
2014-03-16 05:03:17 +01:00
|
|
|
#ifndef _max
|
|
|
|
#define _max(a,b) ((a) > (b) ? (a) : (b))
|
2014-03-15 19:29:11 +01:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#if !defined(DBG_UNREFERENCED_PARAMETER)
|
|
|
|
#define DBG_UNREFERENCED_PARAMETER(x) x
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif
|