Skip to content
GitLab
Menu
Why GitLab
Pricing
Contact Sales
Explore
Why GitLab
Pricing
Contact Sales
Explore
Sign in
Get free trial
Commits on Source (2)
Narrow a scope of macro use.
· 9825b6cb
Eric S. Raymond
authored
Sep 13, 2016
9825b6cb
Move some macros to go with the previous commit emptying out ntp_rfc2553.c.
· 8fd02e14
Eric S. Raymond
authored
Sep 13, 2016
8fd02e14
Hide whitespace changes
Inline
Side-by-side
include/ntp_intres.h
View file @
8fd02e14
...
...
@@ -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
View file @
8fd02e14
...
...
@@ -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
View file @
8fd02e14
...
...
@@ -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
...
...