summary refs log tree commit diff
path: root/sysdeps/unix
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/unix')
-rw-r--r--sysdeps/unix/bsd/osf/sigaction.h27
-rw-r--r--sysdeps/unix/bsd/sys/reboot.h2
-rw-r--r--sysdeps/unix/bsd/usleep.c36
-rw-r--r--sysdeps/unix/dirfd.c30
-rw-r--r--sysdeps/unix/getlogin_r.c2
-rw-r--r--sysdeps/unix/sysv/linux/clock.c39
-rw-r--r--sysdeps/unix/sysv/linux/configure2
-rw-r--r--sysdeps/unix/sysv/linux/configure.in2
-rw-r--r--sysdeps/unix/sysv/linux/gethostid.c2
-rw-r--r--sysdeps/unix/sysv/linux/m68k/mremap.S29
-rw-r--r--sysdeps/unix/sysv/linux/sigaction.h30
-rw-r--r--sysdeps/unix/sysv/linux/signum.h2
-rw-r--r--sysdeps/unix/sysv/linux/sleep.c32
-rw-r--r--sysdeps/unix/sysv/linux/sys/module.h2
-rw-r--r--sysdeps/unix/sysv/linux/sys/mtio.h2
-rw-r--r--sysdeps/unix/sysv/linux/sys/sem_buf.h2
-rw-r--r--sysdeps/unix/sysv/linux/sys/shm_buf.h2
-rw-r--r--sysdeps/unix/sysv/linux/termbits.h2
-rw-r--r--sysdeps/unix/sysv/linux/timebits.h11
-rw-r--r--sysdeps/unix/sysv/linux/usleep.c32
20 files changed, 194 insertions, 94 deletions
diff --git a/sysdeps/unix/bsd/osf/sigaction.h b/sysdeps/unix/bsd/osf/sigaction.h
index d809b6bd74..df400d4aaa 100644
--- a/sysdeps/unix/bsd/osf/sigaction.h
+++ b/sysdeps/unix/bsd/osf/sigaction.h
@@ -1,21 +1,22 @@
-/* Structure and constand definitions for sigaction et al.  OSF/1 version.
+/* Structure and constant definitions for sigaction et al.  OSF/1 version.
    Copyright (C) 1993, 1996 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
    Contributed by Brendan Kehoe (brendan@zen.org).
 
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Library General Public License as
+   published by the Free Software Foundation; either version 2 of the
+   License, or (at your option) any later version.
 
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-Library General Public License for more details.
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Library General Public License for more details.
 
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB.  If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA.  */
+   You should have received a copy of the GNU Library General Public
+   License along with the GNU C Library; see the file COPYING.LIB.  If
+   write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+   Boston, MA 02111-1307, USA.  */
 
 /* Structure describing the action to be taken when a signal arrives.  */
 struct sigaction
diff --git a/sysdeps/unix/bsd/sys/reboot.h b/sysdeps/unix/bsd/sys/reboot.h
index c3c957e17e..f00b1aba65 100644
--- a/sysdeps/unix/bsd/sys/reboot.h
+++ b/sysdeps/unix/bsd/sys/reboot.h
@@ -42,7 +42,7 @@
 
 #define	RB_ASKNAME	0x01	/* ask for file name to reboot from */
 #define	RB_SINGLE	0x02	/* reboot to single user only */
-#define	RB_NOSYNC	0x04	/* dont sync before reboot */
+#define	RB_NOSYNC	0x04	/* don't sync before reboot */
 #define	RB_HALT		0x08	/* don't reboot, just halt */
 #define	RB_INITNAME	0x10	/* name given for /etc/init (unused) */
 #define	RB_DFLTROOT	0x20	/* use compiled-in rootdev */
diff --git a/sysdeps/unix/bsd/usleep.c b/sysdeps/unix/bsd/usleep.c
index 850233aaad..13506d2b8f 100644
--- a/sysdeps/unix/bsd/usleep.c
+++ b/sysdeps/unix/bsd/usleep.c
@@ -1,29 +1,29 @@
-/* Copyright (C) 1992 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+/* Copyright (C) 1992, 1996 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
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Library General Public License as
+   published by the Free Software Foundation; either version 2 of the
+   License, or (at your option) any later version.
 
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-Library General Public License for more details.
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Library General Public License for more details.
 
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB.  If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA.  */
+   You should have received a copy of the GNU Library General Public
+   License along with the GNU C Library; see the file COPYING.LIB.  If not,
+   write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+   Boston, MA 02111-1307, USA.  */
 
-#include <ansidecl.h>
 #include <unistd.h>
 #include <sys/types.h>
 #include <sys/time.h>
 
 /* Sleep USECONDS microseconds, or until a previously set timer goes off.  */
-unsigned int
-DEFUN(usleep, (useconds), unsigned int useconds)
+void
+usleep (useconds)
+     unsigned int useconds;
 {
   struct timeval delay;
 
@@ -32,6 +32,4 @@ DEFUN(usleep, (useconds), unsigned int useconds)
 
   (void) __select (0, (fd_set *) NULL, (fd_set *) NULL, (fd_set *) NULL,
 		   &delay);
-
-  return 0;
 }
diff --git a/sysdeps/unix/dirfd.c b/sysdeps/unix/dirfd.c
index d02c12a1fd..1180dfa63e 100644
--- a/sysdeps/unix/dirfd.c
+++ b/sysdeps/unix/dirfd.c
@@ -1,21 +1,21 @@
-/* dirfd -- Return the file desciptor used by a DIR stream.  Unix version.
-Copyright (C) 1995 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+/* Return the file descriptor used by a DIR stream.  Unix version.
+   Copyright (C) 1995, 1996 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
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Library General Public License as
+   published by the Free Software Foundation; either version 2 of the
+   License, or (at your option) any later version.
 
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-Library General Public License for more details.
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Library General Public License for more details.
 
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB.  If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA.  */
+   You should have received a copy of the GNU Library General Public
+   License along with the GNU C Library; see the file COPYING.LIB.  If not,
+   write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+   Boston, MA 02111-1307, USA.  */
 
 #include <dirent.h>
 #include <dirstream.h>
diff --git a/sysdeps/unix/getlogin_r.c b/sysdeps/unix/getlogin_r.c
index 868fdbee12..75f17cb86f 100644
--- a/sysdeps/unix/getlogin_r.c
+++ b/sysdeps/unix/getlogin_r.c
@@ -27,7 +27,7 @@
 #include <utmp.h>
 
 /* Return at most NAME_LEN characters of the login name of the user in NAME.
-   If it cannot be determined or some other error occured, return the error
+   If it cannot be determined or some other error occurred, return the error
    code.  Otherwise return 0.  */
 
 int
diff --git a/sysdeps/unix/sysv/linux/clock.c b/sysdeps/unix/sysv/linux/clock.c
new file mode 100644
index 0000000000..372afdd149
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/clock.c
@@ -0,0 +1,39 @@
+/* Copyright (C) 1991, 1992, 1996 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
+   modify it under the terms of the GNU Library General Public License as
+   published by the Free Software Foundation; either version 2 of the
+   License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Library General Public License for more details.
+
+   You should have received a copy of the GNU Library General Public
+   License along with the GNU C Library; see the file COPYING.LIB.  If not,
+   write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+   Boston, MA 02111-1307, USA.  */
+
+#include <sys/times.h>
+#include <time.h>
+#include <unistd.h>
+
+/* Return the time used by the program so far (user time + system time).  */
+clock_t
+clock (void)
+{
+  struct tms buf;
+  long clk_tck = __sysconf (_SC_CLK_TCK);
+
+  if (__times (&buf) < 0)
+    return (clock_t) -1;
+
+  return
+    (clk_tck <= CLOCKS_PER_SEC)
+    ? ((unsigned long) buf.tms_utime + buf.tms_stime) * (CLOCKS_PER_SEC
+							 / clk_tck)
+    : ((unsigned long) buf.tms_utime + buf.tms_stime) / (clk_tck
+							 / CLOCKS_PER_SEC);
+}
diff --git a/sysdeps/unix/sysv/linux/configure b/sysdeps/unix/sysv/linux/configure
index 4508848a03..42fe89c269 100644
--- a/sysdeps/unix/sysv/linux/configure
+++ b/sysdeps/unix/sysv/linux/configure
@@ -50,7 +50,7 @@ fi
 
 # The Linux filesystem standard prescribes where to place "essential"
 # files.  I.e., when the installation prefix is "/usr" we have to place
-# shared library objects and the configuation files on the root partition
+# shared library objects and the configuration files on the root partition
 # in /lib and /etc.
 if test "$prefix" = "/usr"; then
   libc_cv_slibdir="/lib"
diff --git a/sysdeps/unix/sysv/linux/configure.in b/sysdeps/unix/sysv/linux/configure.in
index 174eb32ce1..4ac65d02fa 100644
--- a/sysdeps/unix/sysv/linux/configure.in
+++ b/sysdeps/unix/sysv/linux/configure.in
@@ -35,7 +35,7 @@ fi
 
 # The Linux filesystem standard prescribes where to place "essential"
 # files.  I.e., when the installation prefix is "/usr" we have to place
-# shared library objects and the configuation files on the root partition
+# shared library objects and the configuration files on the root partition
 # in /lib and /etc.
 if test "$prefix" = "/usr"; then
   libc_cv_slibdir="/lib"
diff --git a/sysdeps/unix/sysv/linux/gethostid.c b/sysdeps/unix/sysv/linux/gethostid.c
index b313ab3409..67e64208b3 100644
--- a/sysdeps/unix/sysv/linux/gethostid.c
+++ b/sysdeps/unix/sysv/linux/gethostid.c
@@ -79,7 +79,7 @@ gethostid ()
 	return id;
     }
 
-  /* Getting from the file was not succesful.  An intelligent guess for
+  /* Getting from the file was not successful.  An intelligent guess for
      a unique number of a host is its IP address.  Return this.  */
   if (gethostname (hostname, MAXHOSTNAMELEN) < 0 || hostname[0] == '\0')
     /* This also fails.  Return and arbitrary value.  */
diff --git a/sysdeps/unix/sysv/linux/m68k/mremap.S b/sysdeps/unix/sysv/linux/m68k/mremap.S
new file mode 100644
index 0000000000..2fec9aab7b
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/m68k/mremap.S
@@ -0,0 +1,29 @@
+/* Copyright (C) 1996 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
+   modify it under the terms of the GNU Library General Public License as
+   published by the Free Software Foundation; either version 2 of the
+   License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Library General Public License for more details.
+
+   You should have received a copy of the GNU Library General Public
+   License along with the GNU C Library; see the file COPYING.LIB.  If not,
+   write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+   Boston, MA 02111-1307, USA.  */
+
+#include <sysdep.h>
+
+/* The mremap system call is special because it needs to return
+   its value in register %a0.  */
+
+	.text
+PSEUDO (__mremap, mremap, 4)
+	move.l %d0, %a0
+	rts
+PSEUDO_END (__mremap)
+weak_alias (__mremap, mremap)
diff --git a/sysdeps/unix/sysv/linux/sigaction.h b/sysdeps/unix/sysv/linux/sigaction.h
index d8930782d7..13a6a03248 100644
--- a/sysdeps/unix/sysv/linux/sigaction.h
+++ b/sysdeps/unix/sysv/linux/sigaction.h
@@ -1,21 +1,21 @@
 /* The proper definitions for Linux's sigaction.
-Copyright (C) 1993, 1994, 1995 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+   Copyright (C) 1993, 1994, 1995, 1996 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
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Library General Public License as
+   published by the Free Software Foundation; either version 2 of the
+   License, or (at your option) any later version.
 
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-Library General Public License for more details.
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Library General Public License for more details.
 
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB.  If
-not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-Boston, MA 02111-1307, USA.  */
+   You should have received a copy of the GNU Library General Public
+   License along with the GNU C Library; see the file COPYING.LIB.  If not,
+   write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+   Boston, MA 02111-1307, USA.  */
 
 /* Structure describing the action to be taken when a signal arrives.  */
 struct sigaction
@@ -27,7 +27,7 @@ struct sigaction
     __sigset_t sa_mask;
 
     /* Special flags.  */
-    unsigned long sa_flags;
+    int sa_flags;
 
     /* Restore handler.  */
     void (*sa_restorer) __P ((void));
diff --git a/sysdeps/unix/sysv/linux/signum.h b/sysdeps/unix/sysv/linux/signum.h
index 0a2e67e4a5..d8a716f2e0 100644
--- a/sysdeps/unix/sysv/linux/signum.h
+++ b/sysdeps/unix/sysv/linux/signum.h
@@ -56,7 +56,7 @@
 #define	SIGVTALRM	26	/* Virtual alarm clock (4.2 BSD).  */
 #define	SIGPROF		27	/* Profiling alarm clock (4.2 BSD).  */
 #define	SIGWINCH	28	/* Window size change (4.3 BSD, Sun).  */
-#define	SIGPOLL		SIGIO	/* Pollable event occured (System V).  */
+#define	SIGPOLL		SIGIO	/* Pollable event occurred (System V).  */
 #define	SIGIO		29	/* I/O now possible (4.2 BSD).  */
 #define	SIGPWR		30	/* Power failure restart (System V).  */
 #define SIGUNUSED	31
diff --git a/sysdeps/unix/sysv/linux/sleep.c b/sysdeps/unix/sysv/linux/sleep.c
index e669541eed..626c47ff7c 100644
--- a/sysdeps/unix/sysv/linux/sleep.c
+++ b/sysdeps/unix/sysv/linux/sleep.c
@@ -1,22 +1,22 @@
-/* sleep - Implementation of the POSIX sleep function using nanosleep.
-Copyright (C) 1996 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
-Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
+/* Implementation of the POSIX sleep function using nanosleep.
+   Copyright (C) 1996 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+   Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
 
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Library General Public License as
+   published by the Free Software Foundation; either version 2 of the
+   License, or (at your option) any later version.
 
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-Library General Public License for more details.
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Library General Public License for more details.
 
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB.  If
-not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-Boston, MA 02111-1307, USA.  */
+   You should have received a copy of the GNU Library General Public
+   License along with the GNU C Library; see the file COPYING.LIB.  If not,
+   write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+   Boston, MA 02111-1307, USA.  */
 
 #include <time.h>
 #include <unistd.h>
diff --git a/sysdeps/unix/sysv/linux/sys/module.h b/sysdeps/unix/sysv/linux/sys/module.h
index e62254ff40..0b47da29e7 100644
--- a/sysdeps/unix/sysv/linux/sys/module.h
+++ b/sysdeps/unix/sysv/linux/sys/module.h
@@ -42,7 +42,7 @@ extern unsigned long int create_module __P ((__const char *__module_name,
 
 /* Initialize the module called MODULE_NAME with the CONTENTSSIZE
    bytes starting at address CONTENTS.  CONTENTS normally contains the
-   text and data segment of the module (the bss is implicity zeroed).
+   text and data segment of the module (the bss is implicitly zeroed).
    After copying the contents, the function pointed to by
    ROUTINES.init is executed.  When the module is no longer needed,
    ROUTINES.cleanup is executed.  SYMTAB is NULL if the module does
diff --git a/sysdeps/unix/sysv/linux/sys/mtio.h b/sysdeps/unix/sysv/linux/sys/mtio.h
index 918b95d01f..45db6a51b4 100644
--- a/sysdeps/unix/sysv/linux/sys/mtio.h
+++ b/sysdeps/unix/sysv/linux/sys/mtio.h
@@ -24,7 +24,7 @@
 #include <sys/ioctl.h>
 #include <linux/mtio.h>
 
-/* Specifiy default tape device.  */
+/* Specify default tape device.  */
 #ifndef DEFTAPE
 # define DEFTAPE	"/dev/tape"
 #endif
diff --git a/sysdeps/unix/sysv/linux/sys/sem_buf.h b/sysdeps/unix/sysv/linux/sys/sem_buf.h
index 4770354fe2..049a71bc47 100644
--- a/sysdeps/unix/sysv/linux/sys/sem_buf.h
+++ b/sysdeps/unix/sysv/linux/sys/sem_buf.h
@@ -42,7 +42,7 @@ __BEGIN_DECLS
 /* Data structure describing a set of semaphores.  */
 struct semid_ds
 {
-  struct ipc_perm sem_perm;		/* operation permisson struct */
+  struct ipc_perm sem_perm;		/* operation permission struct */
   __time_t sem_otime;			/* last semop() time */
   __time_t sem_ctime;			/* last time changed by semctl() */
   struct sem *__sembase;		/* ptr to first semaphore in array */
diff --git a/sysdeps/unix/sysv/linux/sys/shm_buf.h b/sysdeps/unix/sysv/linux/sys/shm_buf.h
index 08e69eb84c..f6d853744f 100644
--- a/sysdeps/unix/sysv/linux/sys/shm_buf.h
+++ b/sysdeps/unix/sysv/linux/sys/shm_buf.h
@@ -43,7 +43,7 @@ __BEGIN_DECLS
 /* Data structure describing a set of semaphores.  */
 struct shmid_ds
 {
-  struct ipc_perm shm_perm;		/* operation permisson struct */
+  struct ipc_perm shm_perm;		/* operation permission struct */
   int shm_segsz;			/* size of segment in bytes */
   __time_t shm_atime;			/* time of last shmat() */
   __time_t shm_dtime;			/* time of last shmdt() */
diff --git a/sysdeps/unix/sysv/linux/termbits.h b/sysdeps/unix/sysv/linux/termbits.h
index 3045c590a5..536ced356d 100644
--- a/sysdeps/unix/sysv/linux/termbits.h
+++ b/sysdeps/unix/sysv/linux/termbits.h
@@ -17,7 +17,7 @@
    write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
    Boston, MA 02111-1307, USA.  */
 
-/* Use the architecture dependend definitions from the kernel.  */
+/* Use the architecture dependent definitions from the kernel.  */
 #include <asm/termbits.h>
 
 #define _IOT_termios /* Hurd ioctl type field.  */ \
diff --git a/sysdeps/unix/sysv/linux/timebits.h b/sysdeps/unix/sysv/linux/timebits.h
index c31f481a60..52f666faf5 100644
--- a/sysdeps/unix/sysv/linux/timebits.h
+++ b/sysdeps/unix/sysv/linux/timebits.h
@@ -35,9 +35,12 @@ struct timeval
 #ifndef _TIMEBITS_H
 # define _TIMEBITS_H	1
 
-# ifdef __USE_MISC
-#  include <asm/param.h>
-#  define CLOCKS_PER_SEC HZ	/* XXX names not kosher */
-# endif
+/* ISO/IEC 9899:1990 7.12.1: <time.h>
+   The macro `CLOCKS_PER_SEC' is the number per second of the value
+   returned by the `clock' function. */
+/* CAE XSH, Issue 4, Version 2: <time.h>
+   The value of CLOCKS_PER_SEC is required to be 1 million on all
+   XSI-conformant systems. */
+# define CLOCKS_PER_SEC  1000000
 
 #endif	/* timebits.h */
diff --git a/sysdeps/unix/sysv/linux/usleep.c b/sysdeps/unix/sysv/linux/usleep.c
index d08c6b6594..9d36a90008 100644
--- a/sysdeps/unix/sysv/linux/usleep.c
+++ b/sysdeps/unix/sysv/linux/usleep.c
@@ -1 +1,31 @@
-#include <sysdeps/unix/bsd/usleep.c>
+/* Implementation of the BSD usleep function using nanosleep.
+   Copyright (C) 1996 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+   Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Library General Public License as
+   published by the Free Software Foundation; either version 2 of the
+   License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Library General Public License for more details.
+
+   You should have received a copy of the GNU Library General Public
+   License along with the GNU C Library; see the file COPYING.LIB.  If not,
+   write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+   Boston, MA 02111-1307, USA.  */
+
+#include <time.h>
+#include <unistd.h>
+
+void
+usleep (unsigned int useconds)
+{
+  struct timespec ts = { tv_sec: 0,
+			 tv_nsec: (long int) useconds * 1000ul };
+
+  __nanosleep (&ts, NULL);
+}