summaryrefslogtreecommitdiffstats
path: root/usr.sbin/xntpd/patches/patch.40
blob: 7f1941d3a7607ec319bc57b2657e26284eef16ef (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92

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]

OpenPOWER on IntegriCloud