]> git.eshelyaron.com Git - emacs.git/commitdiff
Coalesce duplicate make_lisp_timeval etc.
authorPaul Eggert <eggert@cs.ucla.edu>
Wed, 3 Oct 2018 16:10:00 +0000 (09:10 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Sun, 7 Oct 2018 06:31:03 +0000 (23:31 -0700)
* src/sysdep.c (timeval_to_timespec, make_lisp_timeval):
Coalesce duplicate definitions (Bug#32902).

src/sysdep.c

index 0695686361162b3f9a7497cef8322cef294afae6..7a0c8a8ab85c048243695983fab893ff4f276b41 100644 (file)
@@ -3047,6 +3047,22 @@ list_system_processes (void)
 
 #endif /* !defined (WINDOWSNT) */
 
+
+#if defined __FreeBSD__ || defined DARWIN_OS
+
+static struct timespec
+timeval_to_timespec (struct timeval t)
+{
+  return make_timespec (t.tv_sec, t.tv_usec * 1000);
+}
+static Lisp_Object
+make_lisp_timeval (struct timeval t)
+{
+  return make_lisp_time (timeval_to_timespec (t));
+}
+
+#endif
+
 #if defined GNU_LINUX && defined HAVE_LONG_LONG_INT
 static struct timespec
 time_from_jiffies (unsigned long long tval, long hz)
@@ -3567,18 +3583,6 @@ system_process_attributes (Lisp_Object pid)
 
 #elif defined __FreeBSD__
 
-static struct timespec
-timeval_to_timespec (struct timeval t)
-{
-  return make_timespec (t.tv_sec, t.tv_usec * 1000);
-}
-
-static Lisp_Object
-make_lisp_timeval (struct timeval t)
-{
-  return make_lisp_time (timeval_to_timespec (t));
-}
-
 Lisp_Object
 system_process_attributes (Lisp_Object pid)
 {
@@ -3748,18 +3752,6 @@ system_process_attributes (Lisp_Object pid)
 
 #elif defined DARWIN_OS
 
-static struct timespec
-timeval_to_timespec (struct timeval t)
-{
-  return make_timespec (t.tv_sec, t.tv_usec * 1000);
-}
-
-static Lisp_Object
-make_lisp_timeval (struct timeval t)
-{
-  return make_lisp_time (timeval_to_timespec (t));
-}
-
 Lisp_Object
 system_process_attributes (Lisp_Object pid)
 {