diff --git a/lib/isc/unix/include/isc/dir.h b/lib/isc/unix/include/isc/dir.h index 691e7f761d..a05d492399 100644 --- a/lib/isc/unix/include/isc/dir.h +++ b/lib/isc/unix/include/isc/dir.h @@ -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; diff --git a/lib/isc/win32/include/isc/dir.h b/lib/isc/win32/include/isc/dir.h index e99194c3e9..7610039279 100644 --- a/lib/isc/win32/include/isc/dir.h +++ b/lib/isc/win32/include/isc/dir.h @@ -15,7 +15,7 @@ * SOFTWARE. */ -/* $Id: dir.h,v 1.1 1999/09/23 17:31:59 tale Exp $ */ +/* $Id: dir.h,v 1.2 1999/10/06 19:36:12 tale Exp $ */ /* Principal Authors: DCL */ @@ -23,6 +23,7 @@ #define DIRENT_H 1 #include +#include #include #include @@ -30,15 +31,18 @@ ISC_LANG_BEGINDECLS +#define ISC_DIR_NAMEMAX _MAX_FNAME +#define ISC_DIR_PATHMAX _MAX_PATH + typedef struct { - char name[MAX_PATH]; + char name[ISC_DIR_NAMEMAX]; unsigned int length; WIN32_FIND_DATA find_data; } isc_direntry_t; typedef struct { int magic; - char dirname[MAX_PATH]; + char dirname[ISC_DIR_PATHMAX]; isc_direntry_t entry; isc_boolean_t entry_filled; HANDLE search_handle;