From fe6c01d9f21c739dc729288ea350db865c5dbf95 Mon Sep 17 00:00:00 2001 From: markus schnalke Date: Fri, 10 Apr 2015 11:21:12 +0200 Subject: [PATCH] Remove h/nmh.h Move its contents to h/mh.h. Remove the NLENGTH macro on the way, be cause it is not used. --- configure.ac | 2 +- h/Makefile.in | 2 +- h/mf.h | 2 -- h/mh.h | 44 +++++++++++++++++++++++++++++++++++++++++++- h/nmh.h | 48 ------------------------------------------------ sbr/dtime.c | 1 - sbr/dtimep.lex | 2 +- sbr/mf.c | 3 +++ sbr/mts.c | 1 - uip/dropsbr.c | 2 +- 10 files changed, 50 insertions(+), 57 deletions(-) delete mode 100644 h/nmh.h diff --git a/configure.ac b/configure.ac index 2633228..fda0e5a 100644 --- a/configure.ac +++ b/configure.ac @@ -7,7 +7,7 @@ AC_PREREQ(2.61) dnl (I was able to configure with autoconf-2.59 --meillo 2012-03-22) AC_INIT(mmh, m4_normalize(m4_include([VERSION]))) -AC_CONFIG_SRCDIR(h/nmh.h) +AC_CONFIG_SRCDIR(h/mh.h) AC_CONFIG_HEADER(config.h) AC_CANONICAL_TARGET diff --git a/h/Makefile.in b/h/Makefile.in index 78db70b..31987b5 100644 --- a/h/Makefile.in +++ b/h/Makefile.in @@ -10,7 +10,7 @@ VPATH = @srcdir@ # header files included in distribution HDRS = addrsbr.h aliasbr.h crawl_folders.h dropsbr.h fmt_compile.h \ fmt_scan.h mf.h mh.h mhparse.h mime.h \ - nmh.h prototypes.h rcvmail.h \ + prototypes.h rcvmail.h \ scansbr.h signals.h tws.h utils.h # auxiliary files diff --git a/h/mf.h b/h/mf.h index 75245e0..a39689d 100644 --- a/h/mf.h +++ b/h/mf.h @@ -2,8 +2,6 @@ ** mf.h -- include file for mailbox filters */ -#include - #ifndef TRUE # define TRUE 1 #endif diff --git a/h/mh.h b/h/mh.h index 6b8f4a9..17d5c2f 100644 --- a/h/mh.h +++ b/h/mh.h @@ -2,7 +2,25 @@ ** mh.h -- main header file for all of nmh */ -#include +#include + +#include +#include +#include +#include + +#include + +#include +#include +#include + +#ifdef HAVE_SYS_PARAM_H +# include +#endif + +#include +#include /* ** Well-used constants @@ -36,6 +54,30 @@ typedef unsigned char boolean; /* not int so we can pack in a structure */ #endif /* +** we should be getting this value from pathconf(_PC_PATH_MAX) +*/ +#ifndef PATH_MAX +# ifdef MAXPATHLEN +# define PATH_MAX MAXPATHLEN +# else + /* so we will just pick something */ +# define PATH_MAX 1024 +# endif +#endif + +/* +** we should be getting this value from sysconf(_SC_OPEN_MAX) +*/ +#ifndef OPEN_MAX +# ifdef NOFILE +# define OPEN_MAX NOFILE +# else + /* so we will just pick something */ +# define OPEN_MAX 64 +# endif +#endif + +/* ** user context/profile structure */ struct node { diff --git a/h/nmh.h b/h/nmh.h deleted file mode 100644 index 3da6a14..0000000 --- a/h/nmh.h +++ /dev/null @@ -1,48 +0,0 @@ -/* -** nmh.h -- system configuration header file -*/ - -#include - -#include -#include -#include -#include - -#include -#define NLENGTH(dirent) strlen((dirent)->d_name) - -#include -#include -#include - -#ifdef HAVE_SYS_PARAM_H -# include -#endif - -#include -#include - -/* -** we should be getting this value from pathconf(_PC_PATH_MAX) -*/ -#ifndef PATH_MAX -# ifdef MAXPATHLEN -# define PATH_MAX MAXPATHLEN -# else - /* so we will just pick something */ -# define PATH_MAX 1024 -# endif -#endif - -/* -** we should be getting this value from sysconf(_SC_OPEN_MAX) -*/ -#ifndef OPEN_MAX -# ifdef NOFILE -# define OPEN_MAX NOFILE -# else - /* so we will just pick something */ -# define OPEN_MAX 64 -# endif -#endif diff --git a/sbr/dtime.c b/sbr/dtime.c index 2f8e5dc..f97f65b 100644 --- a/sbr/dtime.c +++ b/sbr/dtime.c @@ -7,7 +7,6 @@ */ #include /* for snprintf() */ -#include #include #include diff --git a/sbr/dtimep.lex b/sbr/dtimep.lex index 83edbff..60a8d82 100644 --- a/sbr/dtimep.lex +++ b/sbr/dtimep.lex @@ -9,7 +9,7 @@ %n2500 %a5000 %{ -#include +#include #include /* diff --git a/sbr/mf.c b/sbr/mf.c index 69afff8..1780997 100644 --- a/sbr/mf.c +++ b/sbr/mf.c @@ -10,6 +10,9 @@ #include #include #include +#include +#include +#include /* ** static prototypes diff --git a/sbr/mts.c b/sbr/mts.c index 95c0a3f..a65d9de 100644 --- a/sbr/mts.c +++ b/sbr/mts.c @@ -7,7 +7,6 @@ */ #include /* for snprintf() */ -#include #include #include #include diff --git a/uip/dropsbr.c b/uip/dropsbr.c index 3c3e105..5b5cf0e 100644 --- a/uip/dropsbr.c +++ b/uip/dropsbr.c @@ -6,7 +6,7 @@ ** complete copyright information. */ -#include +#include #include #include -- 1.7.10.4