about summary refs log tree commit diff
path: root/sysdeps/unix/sysv
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/unix/sysv')
-rw-r--r--sysdeps/unix/sysv/aix/dl-libc.c2
-rw-r--r--sysdeps/unix/sysv/aix/gettimeofday.c23
-rw-r--r--sysdeps/unix/sysv/aix/recv.c28
-rw-r--r--sysdeps/unix/sysv/aix/recvfrom.c8
-rw-r--r--sysdeps/unix/sysv/aix/recvmsg.c6
-rw-r--r--sysdeps/unix/sysv/aix/sendmsg.c6
6 files changed, 52 insertions, 21 deletions
diff --git a/sysdeps/unix/sysv/aix/dl-libc.c b/sysdeps/unix/sysv/aix/dl-libc.c
index 0506d11ef7..69c627c19c 100644
--- a/sysdeps/unix/sysv/aix/dl-libc.c
+++ b/sysdeps/unix/sysv/aix/dl-libc.c
@@ -36,6 +36,6 @@ __libc_dlsym (void *map, const char *name)
 int
 __libc_dlclose (void *map)
 {
-  _dl_close (__map);
+  _dl_close (map);
   return 0;
 }
diff --git a/sysdeps/unix/sysv/aix/gettimeofday.c b/sysdeps/unix/sysv/aix/gettimeofday.c
index c7a4a01c08..031a84ebb6 100644
--- a/sysdeps/unix/sysv/aix/gettimeofday.c
+++ b/sysdeps/unix/sysv/aix/gettimeofday.c
@@ -21,11 +21,14 @@
 #include <sys/time.h>
 
 #ifndef HAVE_GNU_LD
-#define __daylight	daylight
-#define __timezone	timezone
-#define __tzname	tzname
+# define __daylight	daylight
+# define __timezone	timezone
+# define __tzname	tzname
 #endif
 
+extern int rtc_upper (void);
+extern int rtc_lower (void);
+
 /* Assembler Routines to access the timer registers */
 asm("
 .rtc_upper: mfspr   3,4         # copy RTCU to return register
@@ -51,14 +54,14 @@ __gettimeofday (tv, tz)
       return -1;
     }
 
-  ts = rtc_upper();      /* seconds                         */
-  tl = rtc_lower();      /* nanoseconds                     */
-  tu = rtc_upper();      /* Check for a carry from          */
-  if (ts != tu)          /* the lower reg to the upper      */
-      tl  = rtc_lower(); /* Recover from the race condition */
+  ts = rtc_upper ();		/* Seconds.  */
+  tl = rtc_lower ();		/* Nanoseconds.  */
+  tu = rtc_upper ();		/* Check for a carry from.  */
+  if (ts != tu)			/* The lower reg to the upper.  */
+      tl  = rtc_lower ();	/* Recover from the race condition.  */
 
-  tv->tv_sec  = (long int) (tu + (double)tl/1000000000);
-  tv->tv_usec = (long int) ((double)tl/1000);
+  tv->tv_sec  = (long int) (tu + (double) tl / 1000000000);
+  tv->tv_usec = (long int) ((double) tl / 1000);
 
   if (tz != NULL)
     {
diff --git a/sysdeps/unix/sysv/aix/recv.c b/sysdeps/unix/sysv/aix/recv.c
new file mode 100644
index 0000000000..b8ae73e200
--- /dev/null
+++ b/sysdeps/unix/sysv/aix/recv.c
@@ -0,0 +1,28 @@
+/* Copyright (C) 2000, 2001 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 Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 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
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, write to the Free
+   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+   02111-1307 USA.  */
+
+#include <sys/socket.h>
+
+extern ssize_t recv (int fd, void *buf, size_t n, int flags);
+
+
+ssize_t
+__recv (int fd, void *buf, size_t n, int flags)
+{
+  return recv (fd, buf, n, flags);
+}
diff --git a/sysdeps/unix/sysv/aix/recvfrom.c b/sysdeps/unix/sysv/aix/recvfrom.c
index 723a2c893a..08264288d1 100644
--- a/sysdeps/unix/sysv/aix/recvfrom.c
+++ b/sysdeps/unix/sysv/aix/recvfrom.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1999, 2000 Free Software Foundation, Inc.
+/* Copyright (C) 1999, 2000, 2001 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
@@ -18,10 +18,10 @@
 
 #include <sys/socket.h>
 
-extern int nrecvfrom (int s, void *uap_buf, int len, int flags,
-		      void *uap_from, int *uap_fromlenaddr);
+extern ssize_t nrecvfrom (int s, void *uap_buf, size_t len, int flags,
+			  void *uap_from, socklen_t *uap_fromlenaddr);
 
-int
+ssize_t
 recvfrom (int fd, void *buf, size_t n, int flags, __SOCKADDR_ARG addr,
 	  socklen_t *addr_len)
 {
diff --git a/sysdeps/unix/sysv/aix/recvmsg.c b/sysdeps/unix/sysv/aix/recvmsg.c
index 0b695b34da..ea5af3557c 100644
--- a/sysdeps/unix/sysv/aix/recvmsg.c
+++ b/sysdeps/unix/sysv/aix/recvmsg.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1999, 2000 Free Software Foundation, Inc.
+/* Copyright (C) 1999, 2000, 2001 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
@@ -18,9 +18,9 @@
 
 #include <sys/socket.h>
 
-extern int nrecvmsg (int s, struct msghdr *uap_msg, int flags);
+extern ssize_t nrecvmsg (int s, struct msghdr *uap_msg, int flags);
 
-int
+ssize_t
 recvmsg (int fd, struct msghdr *message, int flags)
 {
   return nrecvmsg (fd, message, flags);
diff --git a/sysdeps/unix/sysv/aix/sendmsg.c b/sysdeps/unix/sysv/aix/sendmsg.c
index 9ab19a9dbf..054d374393 100644
--- a/sysdeps/unix/sysv/aix/sendmsg.c
+++ b/sysdeps/unix/sysv/aix/sendmsg.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1999, 2000 Free Software Foundation, Inc.
+/* Copyright (C) 1999, 2000, 2001 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
@@ -18,9 +18,9 @@
 
 #include <sys/socket.h>
 
-extern int nsendmsg (int s, void *uap_msg, int flags);
+extern int nsendmsg (int s, const void *uap_msg, int flags);
 
-int
+ssize_t
 sendmsg (int fd, const struct msghdr *message, int flags)
 {
   return nsendmsg (fd, message, flags);