Oh GACK! src-clean doesn't quite work that easily since cleandist rebuilds the
[unix-history] / contrib / xntpd / patches / patch.40
\ 1\ 1\ 1\ 1
Received: from louie.udel.edu by huey.udel.edu id aa23994; 13 Apr 94 15:58 EDT
Received: from adrastea.lcs.mit.edu by louie.udel.edu id aa07113;
13 Apr 94 15:44 EDT
Received: by adrastea.lcs.mit.edu; id AA04845; Wed, 13 Apr 1994 15:44:23 -0400
Date: Wed, 13 Apr 1994 15:44:23 -0400
From: Garrett Wollman <wollman@adrastea.lcs.mit.edu>
Message-Id: <9404131944.AA04845@adrastea.lcs.mit.edu>
To: Mills@udel.edu
Cc: Garrett Wollman <wollman@adrastea.lcs.mit.edu>,
Frank Kardel <Frank.Kardel@informatik.uni-erlangen.de>
Subject: Re: You xntp modifications...
In-Reply-To: <9404122159.aa18355@huey.udel.edu>
References: <9404122159.aa18355@huey.udel.edu>
<<On Tue, 12 Apr 94 21:59:57 EDT, Mills@udel.edu said:
> Note that we are two versions further along, what with the average of
> a patch per day, so it would be survivable if this issue could be
> cleared up ASAP.
This patch, applied relative to my previous patch, provides for both
behaviors.
*** xntpd/xntpd/ntp_control.c Wed Apr 13 12:37:51 1994
--- ntp_control.c Wed Apr 13 12:38:42 1994
***************
*** 264,271 ****
--- 264,283 ----
/*
* System and processor definitions. These will change for the gizmo board.
*/
+ #ifndef HAVE_UNAME
+ #ifndef STR_SYSTEM
+ #define STR_SYSTEM "UNIX"
+ #endif
+ #ifndef STR_PROCESSOR
+ #define STR_PROCESSOR "unknown"
+ #endif
+
+ static char str_system[] = STR_SYSTEM;
+ static char str_processor[] = STR_PROCESSOR;
+ #else
#include <sys/utsname.h>
static struct utsname utsname;
+ #endif /* HAVE_UNAME */
/*
* Trap structures. We only allow a few of these, and send
***************
*** 426,433 ****
--- 438,447 ----
{
int i;
+ #ifdef HAVE_UNAME
uname(&utsname);
+ #endif /* HAVE_UNAME */
ctl_clr_stats();
ctl_auth_keyid = 0;
***************
*** 1262,1273 ****
--- 1276,1297 ----
ctl_putuint(sys_var[CS_LEAPWARNING].text, (U_LONG)leap_warning);
break;
case CS_PROCESSOR:
+ #ifndef HAVE_UNAME
+ ctl_putstr(sys_var[CS_PROCESSOR].text, str_processor,
+ sizeof(str_processor) - 1);
+ #else
ctl_putstr(sys_var[CS_PROCESSOR].text, utsname.machine,
strlen(utsname.machine));
+ #endif /* HAVE_UNAME */
break;
case CS_SYSTEM:
+ #ifndef HAVE_UNAME
+ ctl_putstr(sys_var[CS_SYSTEM].text, str_system,
+ sizeof(str_system) - 1);
+ #else
ctl_putstr(sys_var[CS_SYSTEM].text, utsname.sysname,
strlen(utsname.sysname));
+ #endif /* HAVE_UNAME */
break;
case CS_KEYID:
ctl_putuint(sys_var[CS_KEYID].text, (U_LONG)0);
[no save]
\ 1\ 1\ 1\ 1