1
0
mirror of https://github.com/lammertb/libhttp.git synced 2025-12-22 04:02:04 +03:00

Set defines for realpath in Linux

This commit is contained in:
bel
2015-08-31 23:32:23 +02:00
parent 95637af83d
commit f5f918cef8

View File

@@ -21,14 +21,23 @@
*/ */
#if defined(_WIN32) #if defined(_WIN32)
#ifndef _CRT_SECURE_NO_WARNINGS #ifndef _CRT_SECURE_NO_WARNINGS
#define _CRT_SECURE_NO_WARNINGS /* Disable deprecation warning in VS2005 */ #define _CRT_SECURE_NO_WARNINGS /* Disable deprecation warning in VS2005 */
#endif #endif
#ifndef _CRT_SECURE_NO_DEPRECATE #ifndef _CRT_SECURE_NO_DEPRECATE
#define _CRT_SECURE_NO_DEPRECATE #define _CRT_SECURE_NO_DEPRECATE
#endif #endif
#else #else
#define _XOPEN_SOURCE 600 /* For PATH_MAX on linux */ #define _XOPEN_SOURCE 600 /* For PATH_MAX on linux */
/* This should also be sufficient for "realpath", according to
* http://man7.org/linux/man-pages/man3/realpath.3.html, but in
* reality it does not seem to work. Try some other defines. */
#define _BSD_SOURCE
#define _XOPEN_SOURCE_EXTENDED
#endif #endif
#ifndef IGNORE_UNUSED_RESULT #ifndef IGNORE_UNUSED_RESULT
@@ -46,11 +55,11 @@
#include <sys/stat.h> #include <sys/stat.h>
#include <stdio.h> #include <stdio.h>
#include <stdint.h> #include <stdint.h>
#include <limits.h>
#include <stdlib.h> #include <stdlib.h>
#include <signal.h> #include <signal.h>
#include <string.h> #include <string.h>
#include <errno.h> #include <errno.h>
#include <limits.h>
#include <stddef.h> #include <stddef.h>
#include <stdarg.h> #include <stdarg.h>
#include <ctype.h> #include <ctype.h>