Use single-bit fields for global flags
[exim.git] / src / src / transports / lmtp.c
index 610320c25aa86f7174d8cda09e4d50b92657a1cf..89c41d3db7526250e3e2f8a2540663812393f938 100644 (file)
@@ -2,7 +2,7 @@
 *     Exim - an Internet mail transport agent    *
 *************************************************/
 
-/* Copyright (c) University of Cambridge 1995 - 2016 */
+/* Copyright (c) University of Cambridge 1995 - 2018 */
 /* See the file NOTICE for conditions of use and distribution. */
 
 
@@ -40,6 +40,17 @@ address can appear in the tables drtables.c. */
 int lmtp_transport_options_count =
   sizeof(lmtp_transport_options)/sizeof(optionlist);
 
+
+#ifdef MACRO_PREDEF
+
+/* Dummy values */
+lmtp_transport_options_block lmtp_transport_option_defaults = {0};
+void lmtp_transport_init(transport_instance *tblock) {}
+BOOL lmtp_transport_entry(transport_instance *tblock, address_item *addr) {return FALSE;}
+
+#else   /*!MACRO_PREDEF*/
+
+
 /* Default private options block for the lmtp transport. */
 
 lmtp_transport_options_block lmtp_transport_option_defaults = {
@@ -479,7 +490,7 @@ if (ob->cmd)
     return FALSE;
 
   /* If the -N option is set, can't do any more. Presume all has gone well. */
-  if (dont_deliver)
+  if (f.dont_deliver)
     goto MINUS_N;
 
 /* As this is a local transport, we are already running with the required
@@ -517,7 +528,7 @@ else
     }
 
   /* If the -N option is set, can't do any more. Presume all has gone well. */
-  if (dont_deliver)
+  if (f.dont_deliver)
     goto MINUS_N;
 
   sockun.sun_family = AF_UNIX;
@@ -610,7 +621,7 @@ if (send_data)
   {
   BOOL ok;
   transport_ctx tctx = {
-    fd_in,
+    {fd_in},
     tblock,
     addrlist,
     US".", US"..",
@@ -664,7 +675,7 @@ if (send_data)
         {
         const uschar *s = string_printing(buffer);
        /* de-const safe here as string_printing known to have alloc'n'copied */
-        addr->message = (s == buffer)? (uschar *)string_copy(s) : US s;
+        addr->message = (s == buffer)? US string_copy(s) : US s;
         }
       }
     /* If the response has failed badly, use it for all the remaining pending
@@ -791,4 +802,5 @@ MINUS_N:
   return FALSE;
 }
 
+#endif /*!MACRO_PREDEF*/
 /* End of transport/lmtp.c */