NAME_MAX not available on SunOS
This commit is contained in:
parent
1657e6296b
commit
b72679c5d0
@ -54,8 +54,28 @@
|
|||||||
|
|
||||||
#define MAX_BUFFER (4096)
|
#define MAX_BUFFER (4096)
|
||||||
|
|
||||||
#ifdef WIN32
|
/* NAME_MAX is typically defined in limits.h */
|
||||||
|
|
||||||
|
#if !defined(NAME_MAX)
|
||||||
|
|
||||||
|
/* FILENAME_MAX might be defined in stdio.h */
|
||||||
|
|
||||||
|
# if defined(FILENAME_MAX)
|
||||||
# define NAME_MAX FILENAME_MAX
|
# define NAME_MAX FILENAME_MAX
|
||||||
|
# else
|
||||||
|
|
||||||
|
/* MAXNAMELEN might be defined in dirent.h */
|
||||||
|
|
||||||
|
# include <dirent.h>
|
||||||
|
# if defined(MAXNAMLEN)
|
||||||
|
# define NAME_MAX MAXNAMLEN
|
||||||
|
# else
|
||||||
|
|
||||||
|
/* Lets not let a silly think like this stop us... just make something up */
|
||||||
|
|
||||||
|
# define NAME_MAX 256
|
||||||
|
# endif
|
||||||
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
|
Loading…
x
Reference in New Issue
Block a user