]> git.ipfire.org Git - thirdparty/ntp.git/commitdiff
[Bug 3871] 4.2.8p17 build without hopf6021 refclock enabled fails.
authorDave Hart <hart@ntp.org>
Sat, 30 Sep 2023 05:35:01 +0000 (05:35 +0000)
committerDave Hart <hart@ntp.org>
Sat, 30 Sep 2023 05:35:01 +0000 (05:35 +0000)
           Reported by Hans Mayer.  Moved NONEMPTY_TRANSLATION_UNIT
           declaration from ntp_types.h to config.h.
Use NONEMPTY_COMPILATION_UNIT in more conditionally-compiled files.

bk: 6517b385IefDb60vlJX2jwFBn47PTQ

59 files changed:
ChangeLog
configure.ac
include/ntp_types.h
libntp/adjtime.c
libntp/audio.c
libntp/bsd_strerror.c
libntp/snprintf.c
libparse/clk_computime.c
libparse/clk_dcf7000.c
libparse/clk_meinberg.c
libparse/clk_rawdcf.c
libparse/clk_rcc8000.c
libparse/clk_schmid.c
libparse/clk_sel240x.c
libparse/clk_trimtaip.c
libparse/clk_trimtsip.c
libparse/clk_varitext.c
libparse/parse.c
libparse/parse_conf.c
ntpd/ntp_crypto.c
ntpd/refclock_acts.c
ntpd/refclock_arbiter.c
ntpd/refclock_as2201.c
ntpd/refclock_atom.c
ntpd/refclock_bancomm.c
ntpd/refclock_chronolog.c
ntpd/refclock_conf.c
ntpd/refclock_dumbclock.c
ntpd/refclock_fg.c
ntpd/refclock_gpsvme.c
ntpd/refclock_heath.c
ntpd/refclock_hopfpci.c
ntpd/refclock_hopfser.c
ntpd/refclock_hpgps.c
ntpd/refclock_irig.c
ntpd/refclock_jjy.c
ntpd/refclock_jupiter.c
ntpd/refclock_local.c
ntpd/refclock_mx4200.c
ntpd/refclock_neoclock4x.c
ntpd/refclock_oncore.c
ntpd/refclock_palisade.c
ntpd/refclock_pcf.c
ntpd/refclock_pst.c
ntpd/refclock_ripencc.c
ntpd/refclock_tpro.c
ntpd/refclock_true.c
ntpd/refclock_tsyncpci.c
ntpd/refclock_tt560.c
ntpd/refclock_ulink.c
ntpd/refclock_wwv.c
ntpd/refclock_wwvb.c
ntpd/refclock_zyfer.c
ntpsnmpd/netsnmp_daemonize.c
ports/winnt/include/config.h
ports/winnt/vs2015/libntp/libntp.vcxproj
ports/winnt/vs2015/libntp/libntp.vcxproj.filters
ports/winnt/vs2015/ntpd/ntpd.vcxproj
ports/winnt/vs2015/ntpd/ntpd.vcxproj.filters

index a27b72b5ac4cdaa50f1114adcde9dbb89b15372f..1dc380cef42d5f39929f1155f232367c91075c7b 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 ---
 
+* [Bug 3871] 4.2.8p17 build without hopf6021 refclock enabled fails.
+             Reported by Hans Mayer.  Moved NONEMPTY_TRANSLATION_UNIT
+             declaration from ntp_types.h to config.h.  <hart@ntp.org>
 * [Bug 3869] Remove long-gone "calldelay" & "crypto sign" from docs.
              Reported by PoolMUC@web.de. <hart@ntp.org>
 * [Bug 3859] Use NotifyIpInterfaceChange on Windows ntpd. <hart@ntp.org>
@@ -39,6 +42,7 @@
 * Provide ntpd thread names to debugger on Windows. <hart@ntp.org>
 * Remove dead code libntp/numtohost.c and its unit tests. <hart@ntp.org>
 * Remove class A, B, C IPv4 distinctions in netof(). <hart@ntp.org>
+* Use NONEMPTY_COMPILATION_UNIT in more conditionally-compiled files.
 
 ---
 (4.2.8p17) 2023/06/06 Released by Harlan Stenn <stenn@ntp.org>
index 3f53382de07c159473bae50235d13599e6486036..5d2138f6ff95360b62cb4e257bab2658640111ca 100644 (file)
@@ -4432,6 +4432,18 @@ AC_DEFINE_UNQUOTED([DYNAMIC_INTERLEAVE], [$ntp_dynamic_interleave],
     [support dynamic interleave?])
 AC_MSG_RESULT([$ntp_ok])
 
+AH_BOTTOM([
+       /*
+        * Macro to use in otherwise-empty source files to comply with ANSI C
+        * requirement that each translation unit (source file) contain some
+        * declaration.  This has commonly been done by declaring an unused
+        * global variable of type int or char.  An extern reference to abs()
+        * serves the same purpose without bloat.  We once used exit() but
+        * that can produce warnings on systems that declare exit() noreturn.
+        */
+       #define NONEMPTY_TRANSLATION_UNIT       extern int abs(int);
+])
+
 NTP_UNITYBUILD
 
 NTP_PROBLEM_TESTS
index c3cf2c196521328a85de682aaafacc7371af3d05..6553f01b8a9794e49f848902bde76ff061103b52 100644 (file)
@@ -254,16 +254,6 @@ aligned_ptr(
        return base + ALIGN_UNITS((minsize < 1) ? 1 : minsize);
 }
 
-/*
- * Macro to use in otherwise-empty source files to comply with ANSI C
- * requirement that each translation unit (source file) contain some
- * declaration.  This has commonly been done by declaring an unused
- * global variable of type int or char.  An extern reference to abs()
- * serves the same purpose without bloat.  We once used exit() but
- * that can produce warnings on systems that declare exit() noreturn.
- */
-#define        NONEMPTY_TRANSLATION_UNIT       extern int abs(int);
-
 /*
  * On Unix struct sock_timeval is equivalent to struct timeval.
  * On Windows built with 64-bit time_t, sock_timeval.tv_sec is a long
index b536cc555d9a36cdb179129b6bbb29ffcccdd88b..57accd68642d80f1c9859ef43292314c79ab2f45 100644 (file)
@@ -381,6 +381,6 @@ adjtime (struct timeval *delta, struct timeval *olddelta)
     return 0;
 }
 # else /* no special adjtime() needed */
-int adjtime_bs;
+NONEMPTY_TRANSLATION_UNIT
 # endif
 #endif
index f404cc078bdcc2b90553fa24b27f7580bfc24edc..2cbae7a30a11c4fb532116fd95550b4107cbfefb 100644 (file)
@@ -517,5 +517,5 @@ audio_show(void)
 #endif /* not PCM_STYLE_SOUND */
 }
 #else
-int audio_bs;
+NONEMPTY_TRANSLATION_UNIT
 #endif /* HAVE_{SYS_AUDIOIO,SUN_AUDIOIO,MACHINE_SOUNDCARD,SYS_SOUNDCARD}_H */
index 5ace9aa48542e7c815a52c4b71f453d9a8b3bdd3..23888a2d1437e18f52d417837be5917427997915 100644 (file)
@@ -45,5 +45,5 @@ strerror(
        return ebuf;
 }
 #else
-int strerror_bs;
+NONEMPTY_TRANSLATION_UNIT
 #endif
index f4685e1ad4b678377b90ec0cf77121a2af85096c..52ec17a04eb2ead0cbee195397cbb36374adbd69 100644 (file)
@@ -1587,7 +1587,7 @@ rpl_asprintf(va_alist) va_dcl
 }
 #endif /* HW_WANT_RPL_ASPRINTF */
 #else  /* Dummy declaration to avoid empty translation unit warnings. */
-int main(void);
+NONEMPTY_TRANSLATION_UNIT
 #endif /* HW_WANT_RPL_SNPRINTF || HW_WANT_RPL_VSNPRINTF || HW_WANT_RPL_ASPRINTF || [...] */
 
 #if TEST_SNPRINTF
index 7273ac762e372739f2f5ce8f2ff9e04e17690ca1..10ec9a7c1c979d627a4ea86daa51e3f31a3ce4a2 100644 (file)
@@ -182,7 +182,7 @@ inp_computime(
 }
 
 #else /* not (REFCLOCK && CLOCK_PARSE && CLOCK_COMPUTIME) */
-int clk_computime_bs;
+NONEMPTY_TRANSLATION_UNIT
 #endif /* not (REFCLOCK && CLOCK_PARSE && CLOCK_COMPUTIME) */
 
 /*
index 0621cd5649e45d6f8aafaa1ae214c0f811fc435e..4aeb4c39ba9f42ba993bbdb37690299382605a85 100644 (file)
@@ -176,7 +176,7 @@ inp_dcf7000(
 }
 
 #else /* not (REFCLOCK && CLOCK_PARSE && CLOCK_DCF7000) */
-int clk_dcf7000_bs;
+NONEMPTY_TRANSLATION_UNIT
 #endif /* not (REFCLOCK && CLOCK_PARSE && CLOCK_DCF7000) */
 
 /*
index e4ebf0acc605b5519dca469fe4a51f4e23d1cba2..1aa839bfd15af0e24b7d9324055fcb7006a020f2 100644 (file)
@@ -733,7 +733,7 @@ gps_input(
 }
 
 #else /* not (REFCLOCK && CLOCK_PARSE && CLOCK_MEINBERG) */
-int clk_meinberg_bs;
+NONEMPTY_TRANSLATION_UNIT
 #endif /* not (REFCLOCK && CLOCK_PARSE && CLOCK_MEINBERG) */
 
 /*
index 3fa74997c9bf0b97c7f18d4f3428fd53433f73df..9b6eeafb163fc3a90bfbae98db0e91b97f8b6520 100644 (file)
@@ -742,7 +742,7 @@ inp_rawdcf(
 }
 
 #else /* not (REFCLOCK && CLOCK_PARSE && CLOCK_RAWDCF) */
-int clk_rawdcf_bs;
+NONEMPTY_TRANSLATION_UNIT
 #endif /* not (REFCLOCK && CLOCK_PARSE && CLOCK_RAWDCF) */
 
 /*
index 11d52acc5a24e6201ca93a4d8a0f3ffeea128e74..e9bb115da4f56b01c2b7f69ca6c48a5b85c2f5a0 100644 (file)
@@ -163,7 +163,7 @@ inp_rcc8000(
 }
 
 #else  /* not (REFCLOCK && CLOCK_PARSE && CLOCK_RCC8000) */
-int clk_rcc8000_bs;
+NONEMPTY_TRANSLATION_UNIT
 #endif  /* not (REFCLOCK && CLOCK_PARSE && CLOCK_RCC8000) */
 
 /*
index d85b1a5da512d03a236dd528dca79e47b522a3c8..5dd52047aa0fd18e4eabada56d0164e09ec01251 100644 (file)
@@ -222,7 +222,7 @@ inp_schmid(
 }
 
 #else /* not (REFCLOCK && CLOCK_PARSE && CLOCK_SCHMID) */
-int clk_schmid_bs;
+NONEMPTY_TRANSLATION_UNIT
 #endif /* not (REFCLOCK && CLOCK_PARSE && CLOCK_SCHMID) */
 
 /*
index b1390b4cefb1b4b4d27f4f056a85f47d49f1f103..f27b662491f19fe7391be09fbc4da71348b0bdaa 100644 (file)
@@ -168,5 +168,5 @@ cvt_sel240x( unsigned char *buffer,
 }
 
 #else  /* not (REFCLOCK && CLOCK_PARSE && CLOCK_SEL240X) */
-int clk_sel240x_bs;
+NONEMPTY_TRANSLATION_UNIT
 #endif /* not (REFCLOCK && CLOCK_PARSE && CLOCK_SEL240X) */
index a60d01ec1870f93e13fb30356f899f4e29b0effb..ce930952ffa23fb568a68a8b5bf0486fecb32c49 100644 (file)
@@ -181,7 +181,7 @@ inp_trimtaip(
 }
 
 #else /* not (REFCLOCK && CLOCK_PARSE && CLOCK_TRIMTAIP) */
-int clk_trimtaip_bs;
+NONEMPTY_TRANSLATION_UNIT
 #endif /* not (REFCLOCK && CLOCK_PARSE && CLOCK_TRIMTAIP) */
 
 /*
index 8cf5660657cc37a9bdefbebce6a2e657460c80dd..5af69d349eeaa05180ad0d5c87b269efd9101741 100644 (file)
@@ -388,7 +388,7 @@ cvt_trimtsip(
 }
 
 #else /* not (REFCLOCK && CLOCK_PARSE && CLOCK_TRIMTSIP && !PARSESTREAM) */
-int clk_trimtsip_bs;
+NONEMPTY_TRANSLATION_UNIT
 #endif /* not (REFCLOCK && CLOCK_PARSE && CLOCK_TRIMTSIP && !PARSESTREAM) */
 
 /*
index 0d830354d7990fd9004487305fa79dc2afa888cd..a4c6d31b797ac1621156f1b7106ac8833850b845 100644 (file)
@@ -252,7 +252,7 @@ inp_varitext(
 }
 
 #else /* not (REFCLOCK && CLOCK_PARSE && CLOCK_VARITEXT) */
-int clk_varitext_bs;
+NONEMPTY_TRANSLATION_UNIT
 #endif /* not (REFCLOCK && CLOCK_PARSE && CLOCK_VARITEXT) */
 
 /*
index 69395ac4a5606fd9719c189da21dfe9a0ed37d11..56f2c3702bd861afaaea3a63f6c23afd5dd14128 100644 (file)
@@ -875,7 +875,7 @@ parse_setcs(
 }
 
 #else /* not (REFCLOCK && CLOCK_PARSE) */
-int parse_bs;
+NONEMPTY_TRANSLATION_UNIT
 #endif /* not (REFCLOCK && CLOCK_PARSE) */
 
 /*
index 37871c9de88721e4f6850753b1ce2c1e0e5a52f4..ad7a47aa937fac0cd6c0c52c0d3b71a4264509eb 100644 (file)
@@ -148,7 +148,7 @@ clockformat_t *clockformats[] =
 unsigned short nformats = sizeof(clockformats) / sizeof(clockformats[0]) - 1;
 
 #else /* not (REFCLOCK && CLOCK_PARSE) */
-int parse_conf_bs;
+NONEMPTY_TRANSLATION_UNIT
 #endif /* not (REFCLOCK && CLOCK_PARSE) */
 
 /*
index 4a4207683331eebc007872d8605649f050cbf755..f9c71ff3157975c49f582f15e6ef304b7d4524dd 100644 (file)
@@ -4168,5 +4168,5 @@ exten_payload_size(
        return (u_int)data_size;
 }
 # else /* !AUTOKEY follows */
-int ntp_crypto_bs_pubkey;
+NONEMPTY_TRANSLATION_UNIT
 # endif        /* !AUTOKEY */
index 944ac764ccff3182914e77e91c9841eab1e05ed4..709427d34e9e4e554172fdccef09dd10f33d9cfd 100644 (file)
@@ -897,5 +897,5 @@ acts_timecode(
        pp->lastref = pp->lastrec;
 }
 #else
-int refclock_acts_bs;
+NONEMPTY_TRANSLATION_UNIT
 #endif /* REFCLOCK */
index 7de613fa751e4e16ce979d8cb201993e48ddc60d..b92e72361bb1ca5888d987042dac60ceac879793 100644 (file)
@@ -473,5 +473,5 @@ arb_poll(
 }
 
 #else
-int refclock_arbiter_bs;
+NONEMPTY_TRANSLATION_UNIT
 #endif /* REFCLOCK */
index d71284173cbb34c492d844c6b126cf8bf51f2273..bb485551bb6cfebfe005fc48107e9e7f506065de 100644 (file)
@@ -385,5 +385,5 @@ as2201_poll(
 }
 
 #else
-int refclock_as2201_bs;
+NONEMPTY_TRANSLATION_UNIT
 #endif /* REFCLOCK */
index b3c0d6b46ab0cb61e2a34bba76d673673fbe50d4..6e01352db982c8170fc967fcade6198a8944815b 100644 (file)
@@ -235,5 +235,5 @@ atom_poll(
        refclock_receive(peer);
 }
 #else
-int refclock_atom_bs;
+NONEMPTY_TRANSLATION_UNIT
 #endif /* REFCLOCK */
index 577ad277213cfeacdb3c0095f3af3c270548771a..d0d855d57b226fade44cc609e0d6d203cb6ef027 100644 (file)
@@ -617,5 +617,5 @@ stfp_time2tvme(struct vmedate *time_vme, struct stfp_time *stfp)
        return;
 }
 #else
-int refclock_bancomm_bs;
+NONEMPTY_TRANSLATION_UNIT
 #endif /* REFCLOCK */
index 1499ee4c81ed5565827124cb59e29e6dde14a7c3..4a8a4aa86efb85086c02b086f6efc92396276ea6 100644 (file)
@@ -339,5 +339,5 @@ chronolog_poll(
 }
 
 #else
-int refclock_chronolog_bs;
+NONEMPTY_TRANSLATION_UNIT
 #endif /* REFCLOCK */
index 30cc632065c8cf25236d427f7da36da5f2712434..ddabf932ea98acdfb84cdc0ce9a6eea8fe932146 100644 (file)
@@ -322,5 +322,5 @@ struct refclock * const refclock_conf[] = {
 u_char num_refclock_conf = sizeof(refclock_conf)/sizeof(struct refclock *);
 
 #else
-int refclock_conf_bs;
+NONEMPTY_TRANSLATION_UNIT
 #endif
index 3563847dac05862a4b8c540eedc56ed8098ca1a9..37aaf28fa02a4ddcb2385e5fe6df8377804612ce 100644 (file)
@@ -373,5 +373,5 @@ dumbclock_poll(
 #endif
 
 #else
-int refclock_dumbclock_bs;
+NONEMPTY_TRANSLATION_UNIT
 #endif /* defined(REFCLOCK) && defined(CLOCK_DUMBCLOCK) */
index abcf43f9cb9e507db95885140113f6a8da32a0f5..9ded8c7e79e010b376e7f6534ed0eaf66266acdb 100644 (file)
@@ -331,5 +331,5 @@ fg_receive(
 
 
 #else
-int refclock_fg_bs;
+NONEMPTY_TRANSLATION_UNIT
 #endif /* REFCLOCK */
index 66ccc9a3ec9008494212a1fefd2c3af3f3256ffd..3920b7a3ccccbcf4a9f95bbb997a58f8b15de874 100644 (file)
@@ -249,5 +249,5 @@ check_leap_sec(struct refclockproc *pp, int unit)
 }
 
 #else
-int    refclock_gpsvme_bs;
+NONEMPTY_TRANSLATION_UNIT
 #endif /* REFCLOCK     */
index e34fa6b9362804911eb8c2246d58b2effc9d1ba8..2d9aa45a5b6d8a35bd5cae48d14382ab64f9a397 100644 (file)
@@ -446,5 +446,5 @@ heath_poll(
 }
 
 #else
-int refclock_heath_bs;
+NONEMPTY_TRANSLATION_UNIT
 #endif /* REFCLOCK */
index 95bcab983c4d639ed2438905db5f781d3fc8a245..5b63e593fa2ba83a2d129b14ea9d9967d89511dd 100644 (file)
@@ -254,5 +254,5 @@ hopfpci_poll(
 }
 
 #else
-int refclock_hopfpci_bs;
+NONEMPTY_TRANSLATION_UNIT
 #endif /* REFCLOCK */
index e8e5ecefdc40b02c8e72533f8c29dc87203c0c17..6cc39c90b7749fb265027cb56802ce12b78aa720 100644 (file)
@@ -362,5 +362,5 @@ hopfserial_poll (
 }
 
 #else
-int refclock_hopfser_bs;
+NONEMPTY_TRANSLATION_UNIT
 #endif /* REFCLOCK */
index fb7085a799e5466aea2e2ee7e6fdfc6cfcbb09ac..e9a87172136d864071876abe4873b1a5c8864a6d 100644 (file)
@@ -622,5 +622,5 @@ hpgps_poll(
 }
 
 #else
-int refclock_hpgps_bs;
+NONEMPTY_TRANSLATION_UNIT
 #endif /* REFCLOCK */
index abc94f62e8fba92a708d7f2ec398c54c45377915..29cf5d6a748eb46aa2046719ce5a1565151d380c 100644 (file)
@@ -1039,5 +1039,5 @@ irig_gain(
 
 
 #else
-int refclock_irig_bs;
+NONEMPTY_TRANSLATION_UNIT
 #endif /* REFCLOCK */
index c4e1697bfdf77255da00c58cdd36a3d3d7c0ca19..84956eb1da2a96267a2bfa44d21aa367bb99eac1 100644 (file)
@@ -4525,5 +4525,5 @@ printableString ( char *sOutput, int iOutputLen, const char *sInput, int iInputL
 /**************************************************************************************************/
 
 #else
-int refclock_jjy_bs ;
+NONEMPTY_TRANSLATION_UNIT
 #endif /* REFCLOCK */
index 7db0198ec6922ac6ee736ae44e10bd672c715e72..4deac7401dc4f75191e1ee1cc797d24dbe018f49 100644 (file)
@@ -1028,5 +1028,5 @@ jupiter_recv(
 }
 
 #else /* not (REFCLOCK && CLOCK_JUPITER && HAVE_PPSAPI) */
-int refclock_jupiter_bs;
+NONEMPTY_TRANSLATION_UNIT
 #endif /* not (REFCLOCK && CLOCK_JUPITER && HAVE_PPSAPI) */
index 8c0f74f62c24cb09367555c034d18aabb7016ed4..62de1a98e84e69bd009125c53e36d30879a42c0c 100644 (file)
@@ -213,5 +213,5 @@ local_poll(
        refclock_receive(peer);
 }
 #else
-int refclock_local_bs;
+NONEMPTY_TRANSLATION_UNIT
 #endif /* REFCLOCK */
index 11c17d069dd4755d25b643cccc740747c22449a5..0de856ee1edbf7d6f6fe0106a8d01110c9492714 100644 (file)
@@ -1635,5 +1635,5 @@ mx4200_send(peer, fmt, va_alist)
 }
 
 #else
-int refclock_mx4200_bs;
+NONEMPTY_TRANSLATION_UNIT
 #endif /* REFCLOCK */
index a543816783108fa574724f8189487d79b25c6ee3..a8c0a336307f7cf0ccf2d3ff7bc0cdaa997bc2aa 100644 (file)
@@ -1057,7 +1057,7 @@ neol_check_firmware(int unit,
 #endif
 
 #else
-int refclock_neoclock4x_bs;
+NONEMPTY_TRANSLATION_UNIT
 #endif /* REFCLOCK */
 
 /*
index d41d54023348a7f0b7c504322caf948986db6d33..512e64b644dafe87c17b9c2431ca9cd39099bb88 100644 (file)
@@ -4136,5 +4136,5 @@ oncore_log_f(
 }
 
 #else
-int refclock_oncore_bs;
+NONEMPTY_TRANSLATION_UNIT
 #endif /* REFCLOCK && CLOCK_ONCORE */
index a9fe2689575bb87b2d27b9c6857baef6133b664f..3a61d60122139f1dbfaa44d98716e4f90577d498 100644 (file)
@@ -1567,5 +1567,5 @@ getsingle(
 }
 
 #else  /* REFCLOCK && CLOCK_PALISADE*/
-int refclock_palisade_c_notempty;
+NONEMPTY_TRANSLATION_UNIT
 #endif
index 45b3475c0d68f87d152c5a62360571ed82499188..4e92370ece105ecec24241fd4b7650cc169b202f 100644 (file)
@@ -223,5 +223,5 @@ pcf_poll(
        refclock_receive(peer);
 }
 #else
-int refclock_pcf_bs;
+NONEMPTY_TRANSLATION_UNIT
 #endif /* REFCLOCK */
index 1d3e1ffcfd6a547e9958d285074017028123e155..bd0f15938101c13cca0643ddc8b62a0e6ee917c5 100644 (file)
@@ -314,5 +314,5 @@ pst_poll(
 }
 
 #else
-int refclock_pst_int;
+NONEMPTY_TRANSLATION_UNIT
 #endif /* REFCLOCK */
index 789029f8aad50b3866029519cbdb6e2c5076b2fc..a7339e3d4936afce55752e35e1c67af50e16941e 100644 (file)
@@ -5250,6 +5250,6 @@ TranslateTSIPReportToText(
 #endif /* TRIMBLE_OUTPUT_FUNC */
 
 #else  /* defined(REFCLOCK) && defined(CLOCK_RIPENCC) */
-int refclock_ripencc_bs;
+NONEMPTY_TRANSLATION_UNIT
 #endif /* defined(REFCLOCK) && defined(CLOCK_RIPENCC) */
 
index ac511bb4b392f4b942ce56bf5a64d2b040e845d1..9adcb5c6c7b367231a7b2ec717f798f0c5cb6dee 100644 (file)
@@ -204,5 +204,5 @@ tpro_poll(
 }
 
 #else
-int refclock_tpro_bs;
+NONEMPTY_TRANSLATION_UNIT
 #endif /* REFCLOCK */
index 78e6adb9acaa7b0d67fb9430298f0aaed14e568b..e41cd1351840489f418120db103b970effd7291f 100644 (file)
@@ -977,5 +977,5 @@ true_sample720(void)
 #endif
 
 #else
-int refclock_true_bs;
+NONEMPTY_TRANSLATION_UNIT
 #endif /* REFCLOCK */
index e14a3fd122c501b3957d51c602a1ac094072620f..49097ea72420defee30733f6c03263f23d20dee7 100644 (file)
@@ -908,5 +908,5 @@ void DoyTimeFromSecTime(DoyTimeObj* pDt, SecTimeObj* pSt)
 } // End DoyTimeFromSecTime
 
 #else
-int refclock_tsyncpci_bs;
+NONEMPTY_TRANSLATION_UNIT
 #endif /* REFCLOCK */
index 171ba5c8cc44effe853d74c22f69d23e3659f7a6..89bca13617f3cf68c5409cdca31acb0c7b7f742b 100644 (file)
@@ -266,5 +266,5 @@ byte_swap(unsigned int input_num)
 }
 
 #else
-int refclock_tt560_bs;
+NONEMPTY_TRANSLATION_UNIT
 #endif /* REFCLOCK */
index 60147adba219b3ee1e673e1e48df84706020c8c4..c09638c21ca0ad60f5da3f2055a6374a901720e8 100644 (file)
@@ -564,5 +564,5 @@ ulink_poll(
 }
 
 #else
-int refclock_ulink_bs;
+NONEMPTY_TRANSLATION_UNIT
 #endif /* REFCLOCK */
index 2736cfa32fd71980ece738a9a1ab4d6ba2e96d8d..f4098ae81cd752474c40403f1f5f875634a528d1 100644 (file)
@@ -2707,5 +2707,5 @@ wwv_gain(
 
 
 #else
-int refclock_wwv_bs;
+NONEMPTY_TRANSLATION_UNIT
 #endif /* REFCLOCK */
index 6aafc26f14086cc2ac88106ef75a0953df6d8fb7..3720cdf80a1c2a5e4f66fb13f53d7229e06e84b4 100644 (file)
@@ -599,5 +599,5 @@ wwvb_control(
 #endif /* HAVE_PPSAPI */
 
 #else
-int refclock_wwvb_bs;
+NONEMPTY_TRANSLATION_UNIT
 #endif /* REFCLOCK */
index f776048686177cd168db713a7db831360ddf77f7..0ec566d5aec706d3ead87e01aa56887918b7c44e 100644 (file)
@@ -344,5 +344,5 @@ zyfer_poll(
 }
 
 #else
-int refclock_zyfer_bs;
+NONEMPTY_TRANSLATION_UNIT
 #endif /* REFCLOCK */
index 44fad1ad3965b533b0a91898d533e441f0ade405..f806266c64af6f0965efc29792f732da6ee36825 100644 (file)
@@ -267,5 +267,5 @@ netsnmp_daemonize(int quit_immediately, int stderr_log)
 }
 
 #else /* !NEED_NETSNMP_DAEMONIZE */
-int netsnp_daemonize_bs;
+NONEMPTY_TRANSLATION_UNIT
 #endif
index 2f2b0d656efa5411e85c2412326c9fbe27db7bee..0b53c53d4d41b52ea44dde22b619e972230463ac 100644 (file)
@@ -562,6 +562,16 @@ typedef unsigned long uintptr_t;
 # define DYNAMIC_INTERLEAVE 0
 #endif
 
+/*
+ * Macro to use in otherwise-empty source files to comply with ANSI C
+ * requirement that each translation unit (source file) contain some
+ * declaration.  This has commonly been done by declaring an unused
+ * global variable of type int or char.  An extern reference to abs()
+ * serves the same purpose without bloat.  We once used exit() but
+ * that can produce warnings on systems that declare exit() noreturn.
+ */
+#define        NONEMPTY_TRANSLATION_UNIT       extern int abs(int);
+
 /*
  * Below this line are includes which must happen after the bulk of
  * config.h is processed.  If you need to add another #include to this
index 1b87cea1d22a96ba69b47ec887dc0aff376292c0..c028b2b18af7f618cf8451433678943904c95d69 100644 (file)
     <ClCompile Include="..\..\..\..\libntp\authreadkeys.c" />
     <ClCompile Include="..\..\..\..\libntp\authusekey.c" />
     <ClCompile Include="..\..\..\..\libntp\a_md5encrypt.c" />
+    <ClCompile Include="..\..\..\..\libntp\bsd_strerror.c" />
     <ClCompile Include="..\..\..\..\libntp\buftvtots.c" />
     <ClCompile Include="..\..\..\..\libntp\caljulian.c" />
     <ClCompile Include="..\..\..\..\libntp\caltontp.c" />
index 23fff905d9bb58ea8efdf520249fe5a64ad75432..d2ee93b1d3d1b9b52ff856256aa8842e59ba41ee 100644 (file)
     <ClCompile Include="..\..\..\..\libntp\lib\isc\win32\win32os.c">
       <Filter>libisc Source Files</Filter>
     </ClCompile>
+    <ClCompile Include="..\..\..\..\libntp\bsd_strerror.c">
+      <Filter>Source Files</Filter>
+    </ClCompile>
   </ItemGroup>
   <ItemGroup>
     <ClInclude Include="..\..\..\..\sntp\libopts\ag-char-map.h">
index a177aa66152b49b643d2e870338e0ce33a579121..e1efd3d9de8bbdd90f6caa666b9d3f4cebc5cb30 100644 (file)
     <ClCompile Include="..\..\..\..\libparse\clk_rawdcf.c" />
     <ClCompile Include="..\..\..\..\libparse\clk_rcc8000.c" />
     <ClCompile Include="..\..\..\..\libparse\clk_schmid.c" />
+    <ClCompile Include="..\..\..\..\libparse\clk_sel240x.c" />
     <ClCompile Include="..\..\..\..\libparse\clk_trimtaip.c" />
     <ClCompile Include="..\..\..\..\libparse\clk_trimtsip.c" />
     <ClCompile Include="..\..\..\..\libparse\clk_varitext.c" />
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
   <ImportGroup Label="ExtensionTargets">
   </ImportGroup>
-</Project>
+</Project>
\ No newline at end of file
index 3ff368308f86c31ad55690e946d5eb89c53a81b5..b4c45ca07127ab4eed59283c0946116eba08b3ed 100644 (file)
     <ClCompile Include="..\..\..\..\ntpd\refclock_gpsdjson.c">
       <Filter>Reference Clock</Filter>
     </ClCompile>
+    <ClCompile Include="..\..\..\..\libparse\clk_sel240x.c">
+      <Filter>Parse Lib</Filter>
+    </ClCompile>
   </ItemGroup>
   <ItemGroup>
     <ClInclude Include="..\..\..\..\include\ascii.h">
     </ResourceCompile>
   </ItemGroup>
   <ItemGroup>
-    <None Include="..\..\libntp\MSG00001.bin">
-      <Filter>Generated Files</Filter>
-    </None>
-    <None Include="..\libntp\messages.mc">
-      <Filter>Resource Files</Filter>
-    </None>
     <None Include="..\..\..\..\ChangeLog" />
   </ItemGroup>
   <ItemGroup>
     <CustomBuild Include="..\..\..\..\ntpd\ntp_parser.h">
       <Filter>Header Files</Filter>
     </CustomBuild>
-    <CustomBuild Include="..\..\..\..\packageinfo.sh" />
+    <CustomBuild Include="..\..\..\..\.bk\SCCS\ChangeSet,s" />
+    <CustomBuild Include="scm-rev" />
   </ItemGroup>
 </Project>
\ No newline at end of file