about summary refs log tree commit diff
path: root/sysdeps/unix/sysv/linux/adjtime.c
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/unix/sysv/linux/adjtime.c')
-rw-r--r--sysdeps/unix/sysv/linux/adjtime.c38
1 files changed, 30 insertions, 8 deletions
diff --git a/sysdeps/unix/sysv/linux/adjtime.c b/sysdeps/unix/sysv/linux/adjtime.c
index 748788c972..7e8d90b71e 100644
--- a/sysdeps/unix/sysv/linux/adjtime.c
+++ b/sysdeps/unix/sysv/linux/adjtime.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -28,16 +28,36 @@
 #define modes mode
 #endif
 
-int
-__adjtime (itv, otv)
-     const struct timeval *itv;
-     struct timeval *otv;
+#ifndef TIMEVAL
+#define TIMEVAL timeval
+#endif
+
+#ifndef TIMEX
+#define TIMEX timex
+#endif
+
+#ifndef ADJTIME
+#define ADJTIME __adjtime
+#endif
+
+#ifndef ADJTIMEX
+#define ADJTIMEX(x) __adjtimex (x)
+#endif
+
+#ifndef LINKAGE
+#define LINKAGE
+#endif
+
+LINKAGE int
+ADJTIME (itv, otv)
+     const struct TIMEVAL *itv;
+     struct TIMEVAL *otv;
 {
-  struct timex tntx;
+  struct TIMEX tntx;
 
   if (itv)
     {
-      struct timeval tmp;
+      struct TIMEVAL tmp;
 
       /* We will do some check here. */
       tmp.tv_sec = itv->tv_sec + itv->tv_usec / 1000000L;
@@ -53,7 +73,7 @@ __adjtime (itv, otv)
   else
     tntx.modes = 0;
 
-  if (__adjtimex (&tntx) < 0) return -1;
+  if (ADJTIMEX (&tntx) < 0) return -1;
 
   if (otv)
     {
@@ -71,4 +91,6 @@ __adjtime (itv, otv)
   return 0;
 }
 
+#ifndef ADJTIME
 weak_alias (__adjtime, adjtime)
+#endif