]> git.ipfire.org Git - thirdparty/ntp.git/commitdiff
Warning patrol, mostly. Also ensure that $(top_srcdir)/version is built
authorBruce Korb <bkorb@ntp.org>
Sat, 31 Dec 2005 00:09:52 +0000 (16:09 -0800)
committerBruce Korb <bkorb@ntp.org>
Sat, 31 Dec 2005 00:09:52 +0000 (16:09 -0800)
in those subdirectories that need it.

bk: 43b5cc50sVO9zjY1Upxz0mgTn688_g

bootstrap
include/debug-opt.def
ntpd/Makefile.am
ntpd/cmd_args.c
ntpd/ntpd.c
ntpdate/Makefile.am
ntpdc/Makefile.am
ntpq/Makefile.am

index 3c29f25c2ba91bef685a9fd7b2d378ccf103f4f9..ed92a58cf828141a0fabb23cd08858e10049e156 100755 (executable)
--- a/bootstrap
+++ b/bootstrap
@@ -34,7 +34,7 @@ gunzip -c $(autoopts-config --libsrc) | (
   cd sntp
   tar -xvf -
   mv libopts-*.*.* libopts )
-mv -f sntp/libopts/m4/libopts.m4 m4/libopts.m4
+mv -f sntp/libopts/libopts.m4 m4/libopts.m4
 
 prog_opt_files=$(
     egrep -l '^prog.name' $(
index bd426bec0f3c325b066106810b5c5d35d1192a9c..783e5b0b1ff06d2b371a1bd1c1cefaa23779a603 100755 (executable)
@@ -1,4 +1,12 @@
 
+include        = <<- _EOF_
+       #ifdef __windows
+         extern int atoi(const char*);
+       #else
+       # include <stdlib.h>
+       #endif
+       _EOF_;
+
 flag = {
     name      = debug-level;
     value     = d;
index 95b15507a62bd77b2753d715225a3db5e061beb3..27890c63ab03b050f90d30ff61141a69526320b1 100644 (file)
@@ -91,6 +91,9 @@ $(PROGRAMS): $(LDADD)
 ../libparse/libparse.a:
        cd ../libparse && $(MAKE)
 
+$(top_srcdir)/version :
+       cd $(top_srcdir) && $(MAKE) version
+
 version.o: $(ntpd_OBJECTS) ../libntp/libntp.a @LIBPARSE@ Makefile $(top_srcdir)/version
        env CSET=`cat $(top_srcdir)/version` $(top_builddir)/scripts/mkver ntpd
        $(COMPILE) -c version.c
index 29b29ab3125d2f429bf4db1875a41f26e0f813eb..d0bbebea2f089f367038dc473b26a8b8e2b58df3 100644 (file)
@@ -20,6 +20,7 @@
  * Definitions of things either imported from or exported to outside
  */
 extern char const *progname;
+extern const char *specific_interface;
 extern int default_ai_family;
 
 
index fcb9562543691e4c5fd98baed112fe849c98a165..63e683c1644f04fb1ea917f19dc4aa501a7e08cb 100644 (file)
@@ -156,7 +156,7 @@ volatile int debug = 0;             /* No debugging by default */
 #endif
 
 int    listen_to_virtual_ips = 1;
-char   *specific_interface = NULL;        /* interface name or IP address to bind to */
+const char *specific_interface = NULL;        /* interface name or IP address to bind to */
 
 /*
  * No-fork flag.  If set, we do not become a background daemon.
@@ -213,14 +213,14 @@ static    RETSIGTYPE      no_debug        P((int));
 
 int            ntpdmain                P((int, char **));
 static void    set_process_priority    P((void));
-static void    init_logging            P((char *));
+static void    init_logging            P((char const *));
 static void    setup_logfile           P((void));
 
 /*
  * Initialize the logging
  */
 void
-init_logging(char *name)
+init_logging(char const *name)
 {
        char *cp;
 
@@ -230,7 +230,7 @@ init_logging(char *name)
         */
        cp = strrchr(name, '/');
        if (cp == 0)
-               cp = name;
+               cp = (char*)name;
        else
                cp++;
 
@@ -268,18 +268,18 @@ setup_logfile(
        )
 {
        if (HAVE_OPT( LOGFILE )) {
-               char *ntp_optarg = OPT_ARG( LOGFILE );
+               const char *optarg = OPT_ARG( LOGFILE );
                FILE *new_file;
 
-               if(strcmp(ntp_optarg, "stderr") == 0)
+               if(strcmp(optarg, "stderr") == 0)
                        new_file = stderr;
-               else if(strcmp(ntp_optarg, "stdout") == 0)
+               else if(strcmp(optarg, "stdout") == 0)
                        new_file = stdout;
                else
-                       new_file = fopen(ntp_optarg, "a");
+                       new_file = fopen(optarg, "a");
                if (new_file != NULL) {
                        NLOG(NLOG_SYSINFO)
-                               msyslog(LOG_NOTICE, "logging to file %s", ntp_optarg);
+                               msyslog(LOG_NOTICE, "logging to file %s", optarg);
                        if (syslog_file != NULL &&
                                fileno(syslog_file) != fileno(new_file))
                                (void)fclose(syslog_file);
@@ -290,7 +290,7 @@ setup_logfile(
                else
                        msyslog(LOG_ERR,
                                "Cannot open log file %s",
-                               ntp_optarg);
+                               optarg);
        }
 }
 
@@ -525,7 +525,7 @@ printf("1: argc=%d\n", argc);
        init_winnt_time();
 #endif
 
-       /* getstartup(argc, argv); /* startup configuration, may set debug */
+       /* getstartup(argc, argv); / * startup configuration, may set debug */
 
 #ifdef DEBUG
        debug = DESC(DEBUG_LEVEL).optOccCt;
index 61920262cde22a66635d45649452eb95151435c9..c6ef27d3e2ed457c6a0330b8af326e3d0eea0dc3 100644 (file)
@@ -18,6 +18,9 @@ $(PROGRAMS): $(LDADD)
 ../libntp/libntp.a:
        cd ../libntp && $(MAKE)
 
+$(top_srcdir)/version :
+       cd $(top_srcdir) && $(MAKE) version
+
 version.o: $(ntpdate_OBJECTS) ../libntp/libntp.a Makefile $(top_srcdir)/version
        env CSET=`cat $(top_srcdir)/version` $(top_builddir)/scripts/mkver ntpdate
        $(COMPILE) -c version.c
index c6d86ee7589e0ed6946c3a1d4e0b5a3ec476c04a..c08aaa1a1f452a81c0f69524fd31adc4a17a9069 100644 (file)
@@ -46,6 +46,9 @@ $(PROGRAMS): $(LDADD)
 ../libntp/libntp.a:
        cd ../libntp && $(MAKE)
 
+$(top_srcdir)/version :
+       cd $(top_srcdir) && $(MAKE) version
+
 version.o: $(ntpdc_OBJECTS) ../libntp/libntp.a Makefile $(top_srcdir)/version
        env CSET=`cat $(top_srcdir)/version` $(top_builddir)/scripts/mkver ntpdc
        $(COMPILE) -c version.c
index fc6f9053557c48f60d6a7ef645e3e66e18d5b08c..3f0d42b4789e4442f697ee69a8cc68380fd97107 100644 (file)
@@ -29,6 +29,9 @@ $(PROGRAMS): $(LDADD)
 ../libntp/libntp.a:
        cd ../libntp && $(MAKE)
 
+$(top_srcdir)/version :
+       cd $(top_srcdir) && $(MAKE) version
+
 version.o: $(ntpq_OBJECTS) ../libntp/libntp.a Makefile $(top_srcdir)/version
        env CSET=`cat $(top_srcdir)/version` $(top_builddir)/scripts/mkver ntpq
        $(COMPILE) -c version.c