Mercurial > emacs
comparison src/filelock.c @ 24459:4e6a6d86b3af
(get_boot_time): Reduce scope of #ifdef BOOT_TIME
to only the part that uses get_boot_time_1.
author | Karl Heuer <kwzh@gnu.org> |
---|---|
date | Tue, 09 Mar 1999 03:31:10 +0000 |
parents | 520e8f39c1f8 |
children | b285eda48e4c |
comparison
equal
deleted
inserted
replaced
24458:1544b0109c3b | 24459:4e6a6d86b3af |
---|---|
108 extern Lisp_Object Vshell_file_name; | 108 extern Lisp_Object Vshell_file_name; |
109 | 109 |
110 static time_t | 110 static time_t |
111 get_boot_time () | 111 get_boot_time () |
112 { | 112 { |
113 #ifdef BOOT_TIME | |
114 struct utmp ut, *utp; | 113 struct utmp ut, *utp; |
115 int fd; | 114 int fd; |
116 EMACS_TIME time_before, after; | 115 EMACS_TIME time_before, after; |
117 int counter; | 116 int counter; |
118 | 117 |
164 return boot_time; | 163 return boot_time; |
165 } | 164 } |
166 } | 165 } |
167 #endif /* defined (CTL_KERN) && defined (KERN_BOOTTIME) */ | 166 #endif /* defined (CTL_KERN) && defined (KERN_BOOTTIME) */ |
168 | 167 |
168 #ifdef BOOT_TIME | |
169 /* Try to get boot time from the current wtmp file. */ | 169 /* Try to get boot time from the current wtmp file. */ |
170 get_boot_time_1 (WTMP_FILE); | 170 get_boot_time_1 (WTMP_FILE); |
171 | 171 |
172 /* If we did not find a boot time in wtmp, look at wtmp, and so on. */ | 172 /* If we did not find a boot time in wtmp, look at wtmp, and so on. */ |
173 for (counter = 0; counter < 20 && boot_time == 1; counter++) | 173 for (counter = 0; counter < 20 && boot_time == 1; counter++) |