[Git][NTPsec/ntpsec][master] 2 commits: Narrow a scope of macro use.

Eric S. Raymond gitlab at mg.gitlab.com
Tue Sep 13 11:37:01 UTC 2016


Eric S. Raymond pushed to branch master at NTPsec / ntpsec


Commits:
9825b6cb by Eric S. Raymond at 2016-09-13T07:23:59-04:00
Narrow a scope of macro use.

- - - - -
8fd02e14 by Eric S. Raymond at 2016-09-13T07:35:51-04:00
Move some macros to go with the previous commit emptying out ntp_rfc2553.c.

- - - - -


3 changed files:

- include/ntp_intres.h
- include/ntp_rfc2553.h
- ntpd/ntp_io.c


Changes:

=====================================
include/ntp_intres.h
=====================================
--- a/include/ntp_intres.h
+++ b/include/ntp_intres.h
@@ -4,7 +4,30 @@
 #ifndef GUARD_NTP_INTRES_H
 #define GUARD_NTP_INTRES_H
 
-#include <ntp_worker.h>
+#include "ntp_worker.h"
+#include "ntp_malloc.h"
+
+struct addrinfo *copy_addrinfo_impl(const struct addrinfo *
+#ifdef EREALLOC_CALLSITE	/* from ntp_malloc.h */
+							   ,
+				    const char *, int
+#endif
+					 );
+struct addrinfo *copy_addrinfo_list_impl(const struct addrinfo *
+#ifdef EREALLOC_CALLSITE	/* from ntp_malloc.h */
+								,
+					 const char *, int
+#endif
+					 );
+#ifdef EREALLOC_CALLSITE
+# define copy_addrinfo(l) \
+	 copy_addrinfo_impl((l), __FILE__, __LINE__)
+# define copy_addrinfo_list(l) \
+	 copy_addrinfo_list_impl((l), __FILE__, __LINE__)
+#else
+# define copy_addrinfo(l)	copy_addrinfo_impl(l)
+# define copy_addrinfo_list(l)	copy_addrinfo_list_impl(l)
+#endif
 
 #ifdef USE_WORKER
 #define	INITIAL_DNS_RETRY	2	/* seconds between queries */


=====================================
include/ntp_rfc2553.h
=====================================
--- a/include/ntp_rfc2553.h
+++ b/include/ntp_rfc2553.h
@@ -74,28 +74,6 @@
 #include "ntp_types.h"
 #include "ntp_malloc.h"
 
-struct addrinfo *copy_addrinfo_impl(const struct addrinfo *
-#ifdef EREALLOC_CALLSITE	/* from ntp_malloc.h */
-							   ,
-				    const char *, int
-#endif
-					 );
-struct addrinfo *copy_addrinfo_list_impl(const struct addrinfo *
-#ifdef EREALLOC_CALLSITE	/* from ntp_malloc.h */
-								,
-					 const char *, int
-#endif
-					 );
-#ifdef EREALLOC_CALLSITE
-# define copy_addrinfo(l) \
-	 copy_addrinfo_impl((l), __FILE__, __LINE__)
-# define copy_addrinfo_list(l) \
-	 copy_addrinfo_list_impl((l), __FILE__, __LINE__)
-#else
-# define copy_addrinfo(l)	copy_addrinfo_impl(l)
-# define copy_addrinfo_list(l)	copy_addrinfo_list_impl(l)
-#endif
-
 /*
  * If various macros are not defined we need to define them
  */
@@ -150,13 +128,4 @@ struct addrinfo *copy_addrinfo_list_impl(const struct addrinfo *
 # define Z_AI_NUMERICSERV	AI_NUMERICSERV
 #endif
 
-
-/* 
- * Set up some macros to look for IPv6 and IPv6 multicast
- */
-
-#if defined(IPV6_JOIN_GROUP) && defined(IPV6_LEAVE_GROUP)
-#  define USE_IPV6_MULTICAST_SUPPORT
-#endif	/* IPV6 Multicast Support */
-
 #endif /* !GUARD_NTP_RFC2553_H */


=====================================
ntpd/ntp_io.c
=====================================
--- a/ntpd/ntp_io.c
+++ b/ntpd/ntp_io.c
@@ -49,7 +49,12 @@
 #define IFS_CREATED     2       /* was just created */
 #define IFS_DELETED     3       /* was just delete */
 
-
+/* 
+ * Set up some macros to look for IPv6 and IPv6 multicast
+ */
+#if defined(IPV6_JOIN_GROUP) && defined(IPV6_LEAVE_GROUP)
+#  define USE_IPV6_MULTICAST_SUPPORT
+#endif	/* IPV6 Multicast Support */
 
 /*
  * setsockopt does not always have the same arg declaration



View it on GitLab: https://gitlab.com/NTPsec/ntpsec/compare/af6cc32c3af1b1c9b8b9d8d9569ddd1bbcc77301...8fd02e14f7957b09c85ab00c3a5b3e45742f87e8
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ntpsec.org/pipermail/vc/attachments/20160913/4a01275e/attachment.html>


More information about the vc mailing list