Prefer PATH_MAX to non-standard MAXPATHLEN.
This commit is contained in:
parent
c55b2782fc
commit
d74fa5b502
5 changed files with 16 additions and 16 deletions
|
@ -54,7 +54,7 @@ struct module
|
||||||
|
|
||||||
struct module_path
|
struct module_path
|
||||||
{
|
{
|
||||||
char path[MAXPATHLEN];
|
char path[PATH_MAX];
|
||||||
};
|
};
|
||||||
|
|
||||||
#define MAPI_MAGIC_HDR 0x4D410000
|
#define MAPI_MAGIC_HDR 0x4D410000
|
||||||
|
|
|
@ -71,8 +71,8 @@ char *alloca();
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
#include <process.h>
|
#include <process.h>
|
||||||
|
|
||||||
#ifndef MAXPATHLEN
|
#ifndef PATH_MAX
|
||||||
#define MAXPATHLEN 128
|
#define PATH_MAX 128
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef strerror
|
#ifdef strerror
|
||||||
|
|
|
@ -227,7 +227,7 @@ load_help(void)
|
||||||
{
|
{
|
||||||
DIR *helpfile_dir = NULL;
|
DIR *helpfile_dir = NULL;
|
||||||
struct dirent *ldirent= NULL;
|
struct dirent *ldirent= NULL;
|
||||||
char filename[MAXPATHLEN];
|
char filename[PATH_MAX];
|
||||||
struct cachefile *cacheptr;
|
struct cachefile *cacheptr;
|
||||||
struct DictionaryIter iter;
|
struct DictionaryIter iter;
|
||||||
|
|
||||||
|
|
|
@ -258,7 +258,7 @@ load_all_modules(int warn)
|
||||||
void
|
void
|
||||||
load_core_modules(int warn)
|
load_core_modules(int warn)
|
||||||
{
|
{
|
||||||
char module_name[MAXPATHLEN];
|
char module_name[PATH_MAX];
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
|
|
||||||
|
@ -286,7 +286,7 @@ load_core_modules(int warn)
|
||||||
int
|
int
|
||||||
load_one_module(const char *path, int coremodule)
|
load_one_module(const char *path, int coremodule)
|
||||||
{
|
{
|
||||||
char modpath[MAXPATHLEN];
|
char modpath[PATH_MAX];
|
||||||
rb_dlink_node *pathst;
|
rb_dlink_node *pathst;
|
||||||
struct module_path *mpath;
|
struct module_path *mpath;
|
||||||
|
|
||||||
|
|
|
@ -2098,15 +2098,15 @@ static struct ConfEntry conf_admin_table[] =
|
||||||
|
|
||||||
static struct ConfEntry conf_log_table[] =
|
static struct ConfEntry conf_log_table[] =
|
||||||
{
|
{
|
||||||
{ "fname_userlog", CF_QSTRING, NULL, MAXPATHLEN, &ConfigFileEntry.fname_userlog },
|
{ "fname_userlog", CF_QSTRING, NULL, PATH_MAX, &ConfigFileEntry.fname_userlog },
|
||||||
{ "fname_fuserlog", CF_QSTRING, NULL, MAXPATHLEN, &ConfigFileEntry.fname_fuserlog },
|
{ "fname_fuserlog", CF_QSTRING, NULL, PATH_MAX, &ConfigFileEntry.fname_fuserlog },
|
||||||
{ "fname_operlog", CF_QSTRING, NULL, MAXPATHLEN, &ConfigFileEntry.fname_operlog },
|
{ "fname_operlog", CF_QSTRING, NULL, PATH_MAX, &ConfigFileEntry.fname_operlog },
|
||||||
{ "fname_foperlog", CF_QSTRING, NULL, MAXPATHLEN, &ConfigFileEntry.fname_foperlog },
|
{ "fname_foperlog", CF_QSTRING, NULL, PATH_MAX, &ConfigFileEntry.fname_foperlog },
|
||||||
{ "fname_serverlog", CF_QSTRING, NULL, MAXPATHLEN, &ConfigFileEntry.fname_serverlog },
|
{ "fname_serverlog", CF_QSTRING, NULL, PATH_MAX, &ConfigFileEntry.fname_serverlog },
|
||||||
{ "fname_killlog", CF_QSTRING, NULL, MAXPATHLEN, &ConfigFileEntry.fname_killlog },
|
{ "fname_killlog", CF_QSTRING, NULL, PATH_MAX, &ConfigFileEntry.fname_killlog },
|
||||||
{ "fname_klinelog", CF_QSTRING, NULL, MAXPATHLEN, &ConfigFileEntry.fname_klinelog },
|
{ "fname_klinelog", CF_QSTRING, NULL, PATH_MAX, &ConfigFileEntry.fname_klinelog },
|
||||||
{ "fname_operspylog", CF_QSTRING, NULL, MAXPATHLEN, &ConfigFileEntry.fname_operspylog },
|
{ "fname_operspylog", CF_QSTRING, NULL, PATH_MAX, &ConfigFileEntry.fname_operspylog },
|
||||||
{ "fname_ioerrorlog", CF_QSTRING, NULL, MAXPATHLEN, &ConfigFileEntry.fname_ioerrorlog },
|
{ "fname_ioerrorlog", CF_QSTRING, NULL, PATH_MAX, &ConfigFileEntry.fname_ioerrorlog },
|
||||||
{ "\0", 0, NULL, 0, NULL }
|
{ "\0", 0, NULL, 0, NULL }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -2192,7 +2192,7 @@ static struct ConfEntry conf_general_table[] =
|
||||||
{ "default_operstring", CF_QSTRING, NULL, REALLEN, &ConfigFileEntry.default_operstring },
|
{ "default_operstring", CF_QSTRING, NULL, REALLEN, &ConfigFileEntry.default_operstring },
|
||||||
{ "default_adminstring",CF_QSTRING, NULL, REALLEN, &ConfigFileEntry.default_adminstring },
|
{ "default_adminstring",CF_QSTRING, NULL, REALLEN, &ConfigFileEntry.default_adminstring },
|
||||||
{ "servicestring", CF_QSTRING, NULL, REALLEN, &ConfigFileEntry.servicestring },
|
{ "servicestring", CF_QSTRING, NULL, REALLEN, &ConfigFileEntry.servicestring },
|
||||||
{ "egdpool_path", CF_QSTRING, NULL, MAXPATHLEN, &ConfigFileEntry.egdpool_path },
|
{ "egdpool_path", CF_QSTRING, NULL, PATH_MAX, &ConfigFileEntry.egdpool_path },
|
||||||
{ "kline_reason", CF_QSTRING, NULL, REALLEN, &ConfigFileEntry.kline_reason },
|
{ "kline_reason", CF_QSTRING, NULL, REALLEN, &ConfigFileEntry.kline_reason },
|
||||||
{ "identify_service", CF_QSTRING, NULL, REALLEN, &ConfigFileEntry.identifyservice },
|
{ "identify_service", CF_QSTRING, NULL, REALLEN, &ConfigFileEntry.identifyservice },
|
||||||
{ "identify_command", CF_QSTRING, NULL, REALLEN, &ConfigFileEntry.identifycommand },
|
{ "identify_command", CF_QSTRING, NULL, REALLEN, &ConfigFileEntry.identifycommand },
|
||||||
|
|
Loading…
Reference in a new issue