[Git][NTPsec/ntpsec][master] Revert "Comment polishing." and "Narrow our depenency on nonstandard code."
Eric S. Raymond
gitlab at mg.gitlab.com
Sun Aug 27 11:37:11 UTC 2017
Eric S. Raymond pushed to branch master at NTPsec / ntpsec
Commits:
1c4cdf23 by Eric S. Raymond at 2017-08-27T07:34:31-04:00
Revert "Comment polishing." and "Narrow our depenency on nonstandard code."
The latter caused build breakage on some systems.
- - - - -
8 changed files:
- include/ntp_net.h
- libntp/isc_interfaceiter.c
- ntpd/ntp_control.c
- ntpd/ntp_io.c
- ntpd/ntp_loopfilter.c
- ntpd/ntp_restrict.c
- ntpd/ntp_sandbox.c
- wscript
Changes:
=====================================
include/ntp_net.h
=====================================
--- a/include/ntp_net.h
+++ b/include/ntp_net.h
@@ -5,11 +5,6 @@
#ifndef GUARD_NTP_NET_H
#define GUARD_NTP_NET_H
-/* FIXME: GCC/glibc dependency - s6_addr32 member of struct in6_addr. */
-#ifndef _DEFAULT_SOURCE
-# define _DEFAULT_SOURCE 1
-#endif
-
#include <sys/types.h>
#include <sys/socket.h>
#include <net/if.h>
=====================================
libntp/isc_interfaceiter.c
=====================================
--- a/libntp/isc_interfaceiter.c
+++ b/libntp/isc_interfaceiter.c
@@ -7,11 +7,6 @@
#include "config.h"
-/* FIXME: GCC/glibc dependency - s6_addr32 member of struct in6_addr. */
-#ifndef _DEFAULT_SOURCE
-# define _DEFAULT_SOURCE 1
-#endif
-
#include <sys/types.h>
#include <sys/ioctl.h>
#ifdef HAVE_SYS_SOCKIO_H
=====================================
ntpd/ntp_control.c
=====================================
--- a/ntpd/ntp_control.c
+++ b/ntpd/ntp_control.c
@@ -5,11 +5,6 @@
#include "config.h"
-/* FIXME: GCC/glibc dependency - s6_addr32 member of struct in6_addr. */
-#ifndef _DEFAULT_SOURCE
-# define _DEFAULT_SOURCE 1
-#endif
-
#include <stdio.h>
#include <ctype.h>
#include <sys/stat.h>
=====================================
ntpd/ntp_io.c
=====================================
--- a/ntpd/ntp_io.c
+++ b/ntpd/ntp_io.c
@@ -4,11 +4,6 @@
#include "config.h"
-/* FIXME: GCC/glibc dependency - s6_addr32 member of struct in6_addr. */
-#ifndef _DEFAULT_SOURCE
-# define _DEFAULT_SOURCE 1
-#endif
-
#include <stdio.h>
#include <signal.h>
#include <fnmatch.h>
=====================================
ntpd/ntp_loopfilter.c
=====================================
--- a/ntpd/ntp_loopfilter.c
+++ b/ntpd/ntp_loopfilter.c
@@ -6,11 +6,6 @@
*/
#include "config.h"
-/* FIXME: GCC/glibc dependency - s6_addr32 member of struct in6_addr. */
-#ifndef _DEFAULT_SOURCE
-# define _DEFAULT_SOURCE 1
-#endif
-
#include <limits.h>
#include <stdio.h>
#include <ctype.h>
=====================================
ntpd/ntp_restrict.c
=====================================
--- a/ntpd/ntp_restrict.c
+++ b/ntpd/ntp_restrict.c
@@ -4,10 +4,6 @@
#include "config.h"
-#ifndef _DEFAULT_SOURCE
-# define _DEFAULT_SOURCE 1
-#endif
-
#include <stdio.h>
#include <sys/types.h>
=====================================
ntpd/ntp_sandbox.c
=====================================
--- a/ntpd/ntp_sandbox.c
+++ b/ntpd/ntp_sandbox.c
@@ -4,11 +4,6 @@
* SPDX-License-Identifier: BSD-2-clause
*/
-/* FIXME: For some BSD functions related to chroot jailing */
-#ifndef _DEFAULT_SOURCE
-# define _DEFAULT_SOURCE 1
-#endif
-
#include <stdio.h>
#include <stdbool.h>
#include <unistd.h>
=====================================
wscript
=====================================
--- a/wscript
+++ b/wscript
@@ -241,19 +241,16 @@ def configure(ctx):
# if >=200112L, all of IEEE 1003.1-2004
# if >=200809L, all of IEEE 1003.1-2008
#
- # FIXME: The code is not quite as standards-clean as this makes it look.
- # More work needs to be done here.
- #
- # A shim, -D_DEFAULT_SOURCE, is required in a handful of
- # files: (1) Near the ISC net handling stuff, where struct in6_addr
- # otherwise loses a member named s6_addr32 that the macros need,
- # and (2) three BSD functions related to chroot jailing in the
- # sandbox code.
+ # FIXME: We'd like this to be -D_POSIX_C_SOURCE=200809L -D_XOPEN_SOURCE=600
+ # rather than -D_GNU_SOURCE, but that runs into problems in two places:
+ # (1) The ISC net handling stuff, where struct in6_addr’ loses a member
+ # named s6_addr32 that the macros need, and (2) three BSD functions
+ # related to chroot jailing in the sandbox code.
#
# Note that _POSIX_C_SOURCE >= 199506L and _GNU_SOURCE both turn on
# _POSIX_PTHREAD_SEMANTICS and _REENTRANT
#
- ctx.env.CFLAGS = ["-std=c99", "-D_POSIX_C_SOURCE=200809L", "-D_XOPEN_SOURCE=600"] + ctx.env.CFLAGS
+ ctx.env.CFLAGS = ["-std=c99", "-D_GNU_SOURCE"] + ctx.env.CFLAGS
msg("--- Configuring main ---")
ctx.setenv("main", ctx.env.derive())
View it on GitLab: https://gitlab.com/NTPsec/ntpsec/commit/1c4cdf23a648f07be686cbb4a6470d80c658aa70
---
View it on GitLab: https://gitlab.com/NTPsec/ntpsec/commit/1c4cdf23a648f07be686cbb4a6470d80c658aa70
You're receiving this email because of your account on gitlab.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ntpsec.org/pipermail/vc/attachments/20170827/a9ca4a59/attachment.html>
More information about the vc
mailing list