mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-31 06:25:31 +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:
@@ -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;
|
||||
|
@@ -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 <windows.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include <isc/lang.h>
|
||||
#include <isc/boolean.h>
|
||||
@@ -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;
|
||||
|
Reference in New Issue
Block a user