]> git.ipfire.org Git - thirdparty/ntp.git/commitdiff
[Bug 713] Windows only: Let command line parameters from the Windows SCM GUI
authorMartin Burnicki <burnicki@ntp.org>
Thu, 8 Nov 2007 17:08:38 +0000 (12:08 -0500)
committerMartin Burnicki <burnicki@ntp.org>
Thu, 8 Nov 2007 17:08:38 +0000 (12:08 -0500)
  override the standard parameters from the ImagePath registry key.
* Added HAVE_INT32_T to the Windows config.h to avoid duplicate definitions.

bk: 47334296X0OLsq9Ph2JztaySGsnofg

ChangeLog
ports/winnt/include/config.h
ports/winnt/ntpd/ntservice.c

index b858da5da985dbcef01a104bd21c2cb951b0f83c..99ebe90a2e65734191fd7cfd362684254f13a26a 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,6 @@
+* [Bug 957] Windows only: Let command line parameters from the Windows SCM GUI
+  override the standard parameters from the ImagePath registry key.
+* Added HAVE_INT32_T to the Windows config.h to avoid duplicate definitions.
 * Update bugreport URL.
 * Update -I documentation.
 * [Bug 713] Fix bug reporting information.
index 3fdefcf053a5cf0bce990a070238427a645b3c5f..2a68fbbed2e943474d6c22b49dd02f29785bbd2d 100644 (file)
@@ -158,6 +158,7 @@ typedef unsigned int        uintptr_t;
 #define pid_t  int             /* PID is an int */
 #define ssize_t        int             /* ssize is an int */
 typedef __int32 int32_t;       /* define a typedef for int32_t */
+#define HAVE_INT32_T   1
 
 /*
  * Map the stream to the file number
index 065f510c040990b17a75651445cd57f04bbb2c47..14a3a83339f2409b2a8e844220cccacdf7de9cf3 100644 (file)
@@ -50,8 +50,17 @@ void ntservice_exit(void);
 
 void WINAPI service_main( DWORD argc, LPTSTR *argv )
 {
-  /* pass the global command line options on to the service */
-  ntpdmain( glb_argc, glb_argv );
+       if ( argc > 1 )
+       {
+               /*
+                * Let command line parameters from the Windows SCM GUI
+                * override the standard parameters from the ImagePath registry key.
+                */
+               glb_argc = argc;
+               glb_argv = argv;
+       }
+
+       ntpdmain( glb_argc, glb_argv );
 }