Skip to content
Snippets Groups Projects
Commit f0684cb7 authored by rswindell's avatar rswindell
Browse files

Moved MAX_PATH definition from gen_defs.h to dirwrap.h.

Added #include <sys/param.h> for PATH_MAX definition on FreeBSD.
parent 82f92731
No related branches found
No related tags found
No related merge requests found
......@@ -40,6 +40,10 @@
#include <stdlib.h> /* _fullpath() on Win32 */
#ifdef __FreeBSD__ /* FreeBSD-specific */
#include <sys/param.h> /* PATH_MAX */
#endif
#include "gen_defs.h" /* ulong */
#include "wrapdll.h" /* DLLEXPORT and DLLCALL */
......@@ -148,9 +152,21 @@ extern "C" {
#endif
#if defined(__unix__)
#define BACKSLASH '/'
#define BACKSLASH '/'
#else /* MS-DOS based OS */
#define BACKSLASH '\\'
#define BACKSLASH '\\'
#endif
#if !defined(MAX_PATH) /* maximum path length */
#if defined MAXPATHLEN
#define MAX_PATH MAXPATHLEN /* clib.h */
#elif defined PATH_MAX
#define MAX_PATH PATH_MAX
#elif defined _MAX_PATH
#define MAX_PATH _MAX_PATH
#else
#define MAX_PATH 260
#endif
#endif
#if defined(_MSC_VER) || defined(__MINGW32__)
......
......@@ -87,18 +87,6 @@ enum {
,CTRL_Z
};
#ifndef MAX_PATH
#if defined MAXPATHLEN
#define MAX_PATH MAXPATHLEN /* clib.h */
#elif defined PATH_MAX
#define MAX_PATH PATH_MAX
#elif defined _MAX_PATH
#define MAX_PATH _MAX_PATH
#else
#define MAX_PATH 260
#endif
#endif
/* Unsigned type short-hands */
#ifndef uchar
#define uchar unsigned char
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment