2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-09-01 06:55:30 +00:00

hurd: Fix build

Move PATH_MAX, NAME_MAX, IOV_MAX default definitions to the common
<isc/platform.h>.
This commit is contained in:
Samuel Thibault
2019-11-10 20:14:17 +00:00
parent 9e2da86ab9
commit d10fbdec84
7 changed files with 24 additions and 27 deletions

View File

@@ -17,14 +17,11 @@
#include <stdbool.h> #include <stdbool.h>
#include <isc/log.h> #include <isc/log.h>
#include <isc/platform.h>
#include <isc/stdtime.h> #include <isc/stdtime.h>
#include <dns/rdatastruct.h> #include <dns/rdatastruct.h>
#include <dst/dst.h> #include <dst/dst.h>
#ifndef PATH_MAX
#define PATH_MAX 1024 /* WIN32, and others don't define this. */
#endif
/*! verbosity: set by -v and -q option in each program, defined in dnssectool.c */ /*! verbosity: set by -v and -q option in each program, defined in dnssectool.c */
extern int verbose; extern int verbose;
extern bool quiet; extern bool quiet;

View File

@@ -136,10 +136,6 @@
#define dumpzone dumpzone_file #define dumpzone dumpzone_file
#endif /* HAVE_LMDB */ #endif /* HAVE_LMDB */
#ifndef PATH_MAX
#define PATH_MAX 1024
#endif
#ifndef SIZE_MAX #ifndef SIZE_MAX
#define SIZE_MAX ((size_t)-1) #define SIZE_MAX ((size_t)-1)
#endif #endif

View File

@@ -26,6 +26,8 @@
#include <sys/types.h> #include <sys/types.h>
#include <isc/platform.h>
#include <ctype.h> #include <ctype.h>
#include <limits.h> #include <limits.h>
#include <stdint.h> #include <stdint.h>
@@ -142,10 +144,6 @@ static const char copyright[] =
#define TYPECLASSFMT "%" STR(TYPECLASSLEN) "[-0-9a-z]_%d" #define TYPECLASSFMT "%" STR(TYPECLASSLEN) "[-0-9a-z]_%d"
#define ATTRIBUTESIZE 256 #define ATTRIBUTESIZE 256
#ifndef PATH_MAX
#define PATH_MAX 1024
#endif
static struct cc { static struct cc {
struct cc *next; struct cc *next;
int rdclass; int rdclass;

View File

@@ -32,6 +32,24 @@
#define ISC_STRERRORSIZE 128 #define ISC_STRERRORSIZE 128
/***
*** System limitations
***/
#include <limits.h>
#ifndef NAME_MAX
#define NAME_MAX 256
#endif
#ifndef PATH_MAX
#define PATH_MAX 1024
#endif
#ifndef IOV_MAX
#define IOV_MAX 1024
#endif
/*** /***
*** Miscellaneous. *** Miscellaneous.
***/ ***/

View File

@@ -25,6 +25,7 @@
#include <isc/log.h> #include <isc/log.h>
#include <isc/magic.h> #include <isc/magic.h>
#include <isc/mem.h> #include <isc/mem.h>
#include <isc/platform.h>
#include <isc/print.h> #include <isc/print.h>
#include <isc/stat.h> #include <isc/stat.h>
#include <isc/stdio.h> #include <isc/stdio.h>
@@ -43,10 +44,6 @@
*/ */
#define LOG_BUFFER_SIZE (8 * 1024) #define LOG_BUFFER_SIZE (8 * 1024)
#ifndef PATH_MAX
#define PATH_MAX 1024 /* WIN32 and others don't define this. */
#endif
/*! /*!
* This is the structure that holds each named channel. A simple linked * This is the structure that holds each named channel. A simple linked
* list chains all of the channels together, so an individual channel is * list chains all of the channels together, so an individual channel is

View File

@@ -63,6 +63,7 @@
#include <isc/log.h> #include <isc/log.h>
#include <isc/md.h> #include <isc/md.h>
#include <isc/mem.h> #include <isc/mem.h>
#include <isc/platform.h>
#include <isc/print.h> #include <isc/print.h>
#include <isc/random.h> #include <isc/random.h>
#include <isc/string.h> #include <isc/string.h>
@@ -696,9 +697,6 @@ isc_file_munmap(void *addr, size_t len) {
} }
#define DISALLOW "\\/ABCDEFGHIJKLMNOPQRSTUVWXYZ" #define DISALLOW "\\/ABCDEFGHIJKLMNOPQRSTUVWXYZ"
#ifndef PATH_MAX
#define PATH_MAX 1024
#endif
static isc_result_t static isc_result_t
digest2hex(unsigned char *digest, unsigned int digestlen, digest2hex(unsigned char *digest, unsigned int digestlen,

View File

@@ -18,16 +18,9 @@
#include <dirent.h> #include <dirent.h>
#include <isc/lang.h> #include <isc/lang.h>
#include <isc/platform.h>
#include <isc/result.h> #include <isc/result.h>
#ifndef NAME_MAX
#define NAME_MAX 256
#endif
#ifndef PATH_MAX
#define PATH_MAX 1024
#endif
/*% Directory Entry */ /*% Directory Entry */
typedef struct isc_direntry { typedef struct isc_direntry {
char name[NAME_MAX]; char name[NAME_MAX];