forked from github/server
update autoconf for gcc (access)
This commit is contained in:
parent
9fc926864e
commit
98b5d2a842
|
@ -22,6 +22,7 @@ ENDIF(HAVE_STDBOOL_H)
|
|||
IF(HAVE_UNISTD_H)
|
||||
CHECK_SYMBOL_EXISTS (sleep "unistd.h" HAVE_SLEEP)
|
||||
CHECK_SYMBOL_EXISTS (usleep "unistd.h" HAVE_USLEEP)
|
||||
CHECK_SYMBOL_EXISTS (access "unistd.h" HAVE_ACCESS)
|
||||
ENDIF(HAVE_UNISTD_H)
|
||||
CHECK_SYMBOL_EXISTS (strcasecmp "string.h" HAVE_STRCASECMP)
|
||||
CHECK_SYMBOL_EXISTS (strncasecmp "string.h" HAVE_STRNCASECMP)
|
||||
|
|
|
@ -12,6 +12,8 @@
|
|||
#cmakedefine HAVE__STRICMP 1
|
||||
#cmakedefine HAVE_SNPRINTF 1
|
||||
#cmakedefine HAVE__SNPRINTF 1
|
||||
#cmakedefine HAVE_ACCESS 1
|
||||
#cmakedefine HAVE__ACCESS 1
|
||||
#cmakedefine HAVE_SLEEP 1
|
||||
#cmakedefine HAVE_USLEEP 1
|
||||
#cmakedefine HAVE__SLEEP 1
|
||||
|
@ -34,6 +36,24 @@
|
|||
#include <strings.h>
|
||||
#endif
|
||||
|
||||
#ifndef HAVE__ACCESS
|
||||
#ifdef HAVE_ACCESS
|
||||
#define _access(path, mode) access(path, mode)
|
||||
#ifndef _A_RDONLY
|
||||
#define _A_RDONLY R_OK
|
||||
#endif
|
||||
#ifndef _A_WRONLY
|
||||
#define _A_WRONLY W_OK
|
||||
#endif
|
||||
#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)
|
||||
|
|
Loading…
Reference in New Issue