2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-31 14:35:26 +00:00

New CPP macros ISC_DIR_NAMEMAX and ISC_DIR_PATHMAX; win32 are based

on _MAX_FNAME and _MAX_PATH, unix are "reasonable values" (256 and 1024)
because unix is inconsistent about this.
This commit is contained in:
David Lawrence
1999-10-06 19:36:13 +00:00
parent b21507bc8d
commit a91a5c2322
2 changed files with 13 additions and 6 deletions

View File

@@ -15,7 +15,7 @@
* SOFTWARE.
*/
/* $Id: dir.h,v 1.2 1999/10/01 01:12:04 tale Exp $ */
/* $Id: dir.h,v 1.3 1999/10/06 19:36:13 tale Exp $ */
/* Principal Authors: DCL */
@@ -31,6 +31,9 @@
ISC_LANG_BEGINDECLS
#define ISC_DIR_NAMEMAX 256
#define ISC_DIR_PATHMAX 1024
typedef struct {
/*
* Ideally, this should be NAME_MAX, but AIX does not define it by
@@ -38,7 +41,7 @@ typedef struct {
* complicates things undesirably, as does adding special conditionals
* just for AIX. So a comfortably sized buffer is chosen instead.
*/
char name[256];
char name[ISC_DIR_NAMEMAX];
unsigned int length;
} isc_direntry_t;
@@ -48,7 +51,7 @@ typedef struct {
* As with isc_direntry_t->name, making this "right" for all systems
* is slightly problematic because AIX does not define PATH_MAX.
*/
char dirname[1024];
char dirname[ISC_DIR_PATHMAX];
isc_direntry_t entry;
DIR * handle;
} isc_dir_t;