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
Branches
Tags
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 */
......@@ -153,6 +157,18 @@ extern "C" {
#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__)
#define CHMOD(s,m) _chmod(s,m)
#elif defined(__BORLANDC__) && !defined(__unix__)
......
......@@ -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.
Please register or to comment