]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
REORG: include: split mailers.h into haproxy/mailers{,-t}.h
authorWilly Tarreau <w@1wt.eu>
Thu, 4 Jun 2020 09:09:42 +0000 (11:09 +0200)
committerWilly Tarreau <w@1wt.eu>
Thu, 11 Jun 2020 08:18:57 +0000 (10:18 +0200)
The file mostly contained struct definitions but there was also a
variable export. Most of the stuff currently lies in checks.h and
should definitely move here!

include/haproxy/mailers-t.h [moved from include/types/mailers.h with 92% similarity]
include/haproxy/mailers.h [new file with mode: 0644]
include/proto/checks.h
src/cfgparse.c
src/mailers.c

similarity index 92%
rename from include/types/mailers.h
rename to include/haproxy/mailers-t.h
index 2b884429833006c12ad877fdcf51916a747f329d..b2a3ac3e47ead215fe5a02fdb481367fccde771f 100644 (file)
@@ -1,10 +1,10 @@
 /*
- * include/types/mailer.h
+ * include/haproxy/mailer-t.h
  * This file defines everything related to mailer.
  *
  * Copyright 2015 Horms Solutions Ltd., Simon Horman <horms@verge.net.au>
  *
- * Based on include/types/peers.h
+ * Based on include/haproxy/peers-t.h
  *
  * Copyright 2010 EXCELIANCE, Emeric Brun <ebrun@exceliance.fr>
  *
@@ -23,8 +23,8 @@
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
-#ifndef _TYPES_MAILERS_H
-#define _TYPES_MAILERS_H
+#ifndef _HAPROXY_MAILERS_T_H
+#define _HAPROXY_MAILERS_T_H
 
 #include <sys/types.h>
 #include <sys/socket.h>
@@ -61,8 +61,5 @@ struct mailers {
        } timeout;
 };
 
-
-extern struct mailers *mailers;
-
-#endif /* _TYPES_MAILERS_H */
+#endif /* _HAPROXY_MAILERS_T_H */
 
diff --git a/include/haproxy/mailers.h b/include/haproxy/mailers.h
new file mode 100644 (file)
index 0000000..5daad86
--- /dev/null
@@ -0,0 +1,34 @@
+/*
+ * include/haproxy/mailer.h
+ * This file lists exported variables and functions for mailers.
+ *
+ * Copyright 2015 Horms Solutions Ltd., Simon Horman <horms@verge.net.au>
+ * Copyright 2020 Willy Tarreau <w@1wt.eu>
+ *
+ * Based on include/haproxy/peers-t.h
+ *
+ * Copyright 2010 EXCELIANCE, Emeric Brun <ebrun@exceliance.fr>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation, version 2.1
+ * exclusively.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+ */
+
+#ifndef _HAPROXY_MAILERS_H
+#define _HAPROXY_MAILERS_H
+
+#include <haproxy/mailers-t.h>
+
+extern struct mailers *mailers;
+
+#endif /* _HAPROXY_MAILERS_H */
index 04c9eeb63836ff7f88a4071d401142ee4be7f389..d24943e75fe45ac353cf8bb4cddd76491270b0a8 100644 (file)
@@ -23,7 +23,7 @@
 #define _PROTO_CHECKS_H
 
 #include <haproxy/action-t.h>
-#include <types/mailers.h>
+#include <haproxy/mailers.h>
 #include <types/checks.h>
 
 const char *get_check_status_description(short check_status);
index 5302a18cc51bdedb47526bd28b126776643df6cb..011977a0a90f4076cadbc5e563b4675f98bbf799 100644 (file)
@@ -40,6 +40,7 @@
 #include <haproxy/chunk.h>
 #include <haproxy/dns.h>
 #include <haproxy/errors.h>
+#include <haproxy/mailers-t.h>
 #include <haproxy/pool.h>
 #include <haproxy/tools.h>
 #include <haproxy/time.h>
@@ -52,7 +53,6 @@
 #include <types/global.h>
 #include <types/obj_type.h>
 #include <types/peers.h>
-#include <types/mailers.h>
 #include <types/stats.h>
 
 #include <proto/acl.h>
index 4335453b59379ef6170fd9682ab23071604c7465..601489481ae213103778bbc87f433bbf7806000b 100644 (file)
@@ -12,6 +12,6 @@
 
 #include <stdlib.h>
 
-#include <types/mailers.h>
+#include <haproxy/mailers-t.h>
 
 struct mailers *mailers = NULL;