[Git][NTPsec/ntpsec][master] 2 commits: Clean out some remnant Windows code (OOM checks).
Eric S. Raymond
gitlab at mg.gitlab.com
Mon Sep 12 13:30:31 UTC 2016
Eric S. Raymond pushed to branch master at NTPsec / ntpsec
Commits:
997bc5da by Eric S. Raymond at 2016-09-12T09:30:21-04:00
Clean out some remnant Windows code (OOM checks).
- - - - -
b8f4989e by Eric S. Raymond at 2016-09-12T09:30:21-04:00
Revert "Remove code conditioned on a symbol that is never defined."
Turned out to be wrong; waf defines the symbol. Addresses GitLab issue
- - - - -
4 changed files:
- include/ntp_malloc.h
- include/ntp_worker.h
- ntpd/ntp_config.c
- ntpd/ntp_util.c
Changes:
=====================================
include/ntp_malloc.h
=====================================
--- a/include/ntp_malloc.h
+++ b/include/ntp_malloc.h
@@ -25,11 +25,6 @@
# ifndef alloca
# define alloca __alloca
# endif
-#elif defined _MSC_VER
-# include <malloc.h>
-# ifndef alloca
-# define alloca _alloca
-# endif
#else
# include <stddef.h>
void * alloca(size_t);
=====================================
include/ntp_worker.h
=====================================
--- a/include/ntp_worker.h
+++ b/include/ntp_worker.h
@@ -7,6 +7,11 @@
#include "ntp_workimpl.h"
+/* XXX: Why does OpenBSD need pthread.h here? */
+#ifdef PLATFORM_OPENBSD
+#include <pthread.h>
+#endif
+
#ifdef USE_WORKER
# if defined(USE_WORK_THREAD) && defined(USE_WORK_PIPE)
# ifdef HAVE_SEMAPHORE_H
=====================================
ntpd/ntp_config.c
=====================================
--- a/ntpd/ntp_config.c
+++ b/ntpd/ntp_config.c
@@ -382,10 +382,6 @@ free_config_tree(
config_tree *ptree
)
{
-#if defined(_MSC_VER) && defined (_DEBUG)
- _CrtCheckMemory();
-#endif
-
if (ptree->source.value.s != NULL)
free(ptree->source.value.s);
@@ -410,10 +406,6 @@ free_config_tree(
free_auth_node(ptree);
free(ptree);
-
-#if defined(_MSC_VER) && defined (_DEBUG)
- _CrtCheckMemory();
-#endif
}
/* generic fifo routines for structs linked by 1st member */
=====================================
ntpd/ntp_util.c
=====================================
--- a/ntpd/ntp_util.c
+++ b/ntpd/ntp_util.c
@@ -101,9 +101,6 @@ void uninit_util(void);
void
uninit_util(void)
{
-#if defined(_MSC_VER) && defined (_DEBUG)
- _CrtCheckMemory();
-#endif
if (stats_drift_file) {
free(stats_drift_file);
stats_drift_file = NULL;
@@ -121,10 +118,6 @@ uninit_util(void)
filegen_unregister("protostats");
filegen_unregister("timingstats");
filegen_unregister("usestats");
-
-#if defined(_MSC_VER) && defined (_DEBUG)
- _CrtCheckMemory();
-#endif
}
#endif /* DEBUG */
View it on GitLab: https://gitlab.com/NTPsec/ntpsec/compare/75b83178c80519dfadb3250b2a54b3ea677329ce...b8f4989e9748a2b4893dc0c7cc0fdfd965ed9ee0
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ntpsec.org/pipermail/vc/attachments/20160912/c381b32d/attachment.html>
More information about the vc
mailing list