From: Paul Eggert Date: Tue, 15 Aug 2023 22:55:08 +0000 (-0700) Subject: Simplify get_boot_sec X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=cc5649bd2840de4d339b9cf4a3735d316a4a759d;p=emacs.git Simplify get_boot_sec * src/filelock.c (get_boot_sec): Simplify by removing a special case for MS-DOS. * src/msdos.c (get_boot_time): New dummy that always fails. --- diff --git a/src/filelock.c b/src/filelock.c index f3075b93322..c2b306ab47d 100644 --- a/src/filelock.c +++ b/src/filelock.c @@ -118,16 +118,10 @@ get_boot_sec (void) if (will_dump_p ()) return 0; -#ifndef MSDOS - { - struct timespec boot_time; - boot_time.tv_sec = 0; - get_boot_time (&boot_time); - return boot_time.tv_sec; - } -#else /* MSDOS */ - return 0; -#endif /* MSDOS */ + struct timespec boot_time; + boot_time.tv_sec = 0; + get_boot_time (&boot_time); + return boot_time.tv_sec; } /* An arbitrary limit on lock contents length. 8 K should be plenty diff --git a/src/msdos.c b/src/msdos.c index 1b7f2d4ae21..20af5353e70 100644 --- a/src/msdos.c +++ b/src/msdos.c @@ -4286,6 +4286,12 @@ init_gettimeofday (void) } #endif +int +get_boot_time (struct timespec *p_boot_time) +{ + return -1; +} + static void msdos_abort (void) {