# Build the builtin-macros data struct
-MACRO_HSRC = macro_predef.h os.h globals.h config.h macros.h \
+MACRO_HSRC = macro_predef.h os.h globals.h config.h macros.h path_max.h \
routers/accept.h routers/dnslookup.h routers/ipliteral.h \
routers/iplookup.h routers/manualroute.h routers/queryprogram.h \
routers/redirect.h
$(MONBIN)
eximon.bin: $(EXIMON_EDITME) eximon $(OBJ_MONBIN) ../exim_monitor/em_version.c \
- mytypes.h store.h macros.h
+ mytypes.h store.h path_max.h macros.h
@echo "$(CC) exim_monitor/em_version.c"
$(FE)$(CC) -o em_version.o -c \
$(CFLAGS) $(XINCLUDE) -I. ../exim_monitor/em_version.c
local_scan.h \
macros.h \
mytypes.h \
+ path_max.h \
sha_ver.h \
structs.h \
os.h
../local_scan.h \
../macros.h \
../mytypes.h \
+ ../path_max.h \
../structs.h \
../os.h
typedef void * hctx;
#include "local_scan.h"
+#include "path_max.h"
#include "macros.h"
#include "structs.h"
#include "blob.h"
#define EM_VERSION_C
-/* Needed by macros.h */
-/* Some systems have PATH_MAX and some have MAX_PATH_LEN. */
-
-#ifndef PATH_MAX
-# ifdef MAX_PATH_LEN
-# define PATH_MAX MAX_PATH_LEN
-# else
-# define PATH_MAX 1024
-# endif
-#endif
-
#include "mytypes.h"
#include "store.h"
+#include "path_max.h"
#include "macros.h"
#include <string.h>
#include <stdlib.h>
for f in blob.h dbfunctions.h exim.h functions.h globals.h \
hash.h hintsdb.h hintsdb_structs.h local_scan.h \
- macros.h mytypes.h osfunctions.h store.h structs.h lookupapi.h sha_ver.h \
+ macros.h mytypes.h osfunctions.h path_max.h store.h \
+ structs.h lookupapi.h sha_ver.h \
\
acl.c buildconfig.c base64.c child.c crypt16.c daemon.c dbfn.c debug.c \
deliver.c directory.c dns.c dnsbl.c drtables.c dummies.c enq.c exim.c \
# define EXIM_ARITH_MIN (-EXIM_ARITH_MAX - 1)
#endif
-/* Some systems have PATH_MAX and some have MAX_PATH_LEN. */
-
-#ifndef PATH_MAX
-# ifdef MAX_PATH_LEN
-# define PATH_MAX MAX_PATH_LEN
-# else
-# define PATH_MAX 1024
-# endif
-#endif
-
/* RFC 5321 specifies that the maximum length of a local-part is 64 octets
and the maximum length of a domain is 255 octets, but then also defines
the maximum length of a forward/reverse path as 256 not 64+1+255.
*/
#include "local_scan.h"
+#include "path_max.h"
#include "macros.h"
#include "hintsdb.h"
#include "hintsdb_structs.h"
return US getcwd(CS buffer, size);
}
#else
-#ifndef PATH_MAX
-# define PATH_MAX 4096
-#endif
+# include "path_max.h"
unsigned char *
os_getcwd(unsigned char * buffer, size_t size)
{
--- /dev/null
+/*************************************************
+* Exim - an Internet mail transport agent *
+*************************************************/
+
+/* Copyright (c) The Exim Maintainers 2024 */
+/* See the file NOTICE for conditions of use and distribution. */
+/* SPDX-License-Identifier: GPL-2.0-or-later */
+
+/* This was in exim.h - but not all files needing it can include all of that. */
+/* Needed by macros.h */
+/* Some systems have PATH_MAX and some have MAX_PATH_LEN. */
+#ifndef PATH_MAX
+# ifdef MAX_PATH_LEN
+# define PATH_MAX MAX_PATH_LEN
+# else
+# define PATH_MAX 4096
+# endif
+#endif
+
ob->tls_preload = null_tls_preload;
}
-#else
-
-static void
-tls_server_creds_invalidate(void)
-{ return; }
-
-static void
-tls_client_creds_invalidate(transport_instance * t)
-{ return; }
-
#endif /*EXIM_HAVE_INOTIFY*/
static void tls_per_lib_daemon_init(void);
static void tls_per_lib_daemon_tick(void);
static unsigned tls_server_creds_init(void);
-static void tls_server_creds_invalidate(void);
static void tls_client_creds_init(transport_instance *, BOOL);
-static void tls_client_creds_invalidate(transport_instance *);
static void tls_daemon_creds_reload(void);
static BOOL opt_set_and_noexpand(const uschar *);
static BOOL opt_unset_or_noexpand(const uschar *);
+#if defined(EXIM_HAVE_INOTIFY) || defined(EXIM_HAVE_KEVENT)
+static void tls_server_creds_invalidate(void);
+static void tls_client_creds_invalidate(transport_instance *);
+#endif
+
/* This module is compiled only when it is specifically requested in the
for(transport_instance * t = transports; t; t = t->next)
if (Ustrcmp(t->driver_name, "smtp") == 0)
{
+#if defined(EXIM_HAVE_INOTIFY) || defined(EXIM_HAVE_KEVENT)
tls_client_creds_invalidate(t);
+#endif
tls_client_creds_init(t, watch);
}
}
tls_watch_invalidate();
#endif
+#if defined(EXIM_HAVE_INOTIFY) || defined(EXIM_HAVE_KEVENT)
tls_server_creds_invalidate();
+#endif
/* _expire is for a time-limited selfsign server cert */
tls_creds_expire = (lifetime = tls_server_creds_init())