about 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/opendir.c12
-rw-r--r--sysdeps/unix/sysv/aix/Makefile2
-rw-r--r--sysdeps/unix/sysv/aix/restf.S58
-rw-r--r--sysdeps/unix/sysv/aix/savef.S58
4 files changed, 125 insertions, 5 deletions
diff --git a/sysdeps/unix/opendir.c b/sysdeps/unix/opendir.c
index 461f82bc97..927caab70f 100644
--- a/sysdeps/unix/opendir.c
+++ b/sysdeps/unix/opendir.c
@@ -120,11 +120,15 @@ __opendir (const char *name)
      O_DIRECTORY flag is honored by the kernel.  */
   if (__builtin_expect (__fxstat64 (_STAT_VER, fd, &statbuf), 0) < 0)
     goto lose;
-  if (o_directory_works <= 0
-      && __builtin_expect (! S_ISDIR (statbuf.st_mode), 0))
+#ifdef O_DIRECTORY
+  if (o_directory_works <= 0)
+#endif
     {
-      save_errno = ENOTDIR;
-      goto lose;
+      if (__builtin_expect (! S_ISDIR (statbuf.st_mode), 0))
+	{
+	  save_errno = ENOTDIR;
+	  goto lose;
+	}
     }
 
   if (__builtin_expect (__fcntl (fd, F_SETFD, FD_CLOEXEC), 0) < 0)
diff --git a/sysdeps/unix/sysv/aix/Makefile b/sysdeps/unix/sysv/aix/Makefile
index b49b56267e..cb8683bee5 100644
--- a/sysdeps/unix/sysv/aix/Makefile
+++ b/sysdeps/unix/sysv/aix/Makefile
@@ -6,7 +6,7 @@
 static-start-installed-name = /usr/lib/crt0.o
 
 ifeq ($(subdir),misc)
-sysdep_routines += dl-open dl-sym dl-close
+sysdep_routines += dl-open dl-sym dl-close restf savef
 endif
 
 ifeq ($(subdir),login)
diff --git a/sysdeps/unix/sysv/aix/restf.S b/sysdeps/unix/sysv/aix/restf.S
new file mode 100644
index 0000000000..049627e5c4
--- /dev/null
+++ b/sysdeps/unix/sysv/aix/restf.S
@@ -0,0 +1,58 @@
+/* Copyright (C) 2000 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>
+
+ENTRY(_restf_all)
+		ASM_GLOBAL_DIRECTIVE C_TEXT(_restf14)
+C_TEXT(_restf14):	lfd	fp14,-144(r11)
+		ASM_GLOBAL_DIRECTIVE C_TEXT(_restf15)
+C_TEXT(_restf15):	lfd	fp15,-136(r11)
+		ASM_GLOBAL_DIRECTIVE C_TEXT(_restf16)
+C_TEXT(_restf16):	lfd	fp16,-128(r11)
+		ASM_GLOBAL_DIRECTIVE C_TEXT(_restf17)
+C_TEXT(_restf17):	lfd	fp17,-120(r11)
+		ASM_GLOBAL_DIRECTIVE C_TEXT(_restf18)
+C_TEXT(_restf18):	lfd	fp18,-112(r11)
+		ASM_GLOBAL_DIRECTIVE C_TEXT(_restf19)
+C_TEXT(_restf19):	lfd	fp19,-104(r11)
+		ASM_GLOBAL_DIRECTIVE C_TEXT(_restf20)
+C_TEXT(_restf20):	lfd	fp20,-96(r11)
+		ASM_GLOBAL_DIRECTIVE C_TEXT(_restf21)
+C_TEXT(_restf21):	lfd	fp21,-88(r11)
+		ASM_GLOBAL_DIRECTIVE C_TEXT(_restf22)
+C_TEXT(_restf22):	lfd	fp22,-80(r11)
+		ASM_GLOBAL_DIRECTIVE C_TEXT(_restf23)
+C_TEXT(_restf23):	lfd	fp23,-72(r11)
+		ASM_GLOBAL_DIRECTIVE C_TEXT(_restf24)
+C_TEXT(_restf24):	lfd	fp24,-64(r11)
+		ASM_GLOBAL_DIRECTIVE C_TEXT(_restf25)
+C_TEXT(_restf25):	lfd	fp25,-56(r11)
+		ASM_GLOBAL_DIRECTIVE C_TEXT(_restf26)
+C_TEXT(_restf26):	lfd	fp26,-48(r11)
+		ASM_GLOBAL_DIRECTIVE C_TEXT(_restf27)
+C_TEXT(_restf27):	lfd	fp27,-40(r11)
+		ASM_GLOBAL_DIRECTIVE C_TEXT(_restf28)
+C_TEXT(_restf28):	lfd	fp28,-32(r11)
+		ASM_GLOBAL_DIRECTIVE C_TEXT(_restf29)
+C_TEXT(_restf29):	lfd	fp29,-24(r11)
+		ASM_GLOBAL_DIRECTIVE C_TEXT(_restf30)
+C_TEXT(_restf30):	lfd	fp30,-16(r11)
+		ASM_GLOBAL_DIRECTIVE C_TEXT(_restf31)
+C_TEXT(_restf31):	lfd	fp31,-8(r11)
+		blr
diff --git a/sysdeps/unix/sysv/aix/savef.S b/sysdeps/unix/sysv/aix/savef.S
new file mode 100644
index 0000000000..4c10d6ec85
--- /dev/null
+++ b/sysdeps/unix/sysv/aix/savef.S
@@ -0,0 +1,58 @@
+/* Copyright (C) 2000 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>
+
+ENTRY(_savef_all)
+		ASM_GLOBAL_DIRECTIVE C_TEXT(_savef14)
+C_TEXT(_savef14):	stfd	fp14,-144(r11)
+		ASM_GLOBAL_DIRECTIVE C_TEXT(_savef15)
+C_TEXT(_savef15):	stfd	fp15,-136(r11)
+		ASM_GLOBAL_DIRECTIVE C_TEXT(_savef16)
+C_TEXT(_savef16):	stfd	fp16,-128(r11)
+		ASM_GLOBAL_DIRECTIVE C_TEXT(_savef17)
+C_TEXT(_savef17):	stfd	fp17,-120(r11)
+		ASM_GLOBAL_DIRECTIVE C_TEXT(_savef18)
+C_TEXT(_savef18):	stfd	fp18,-112(r11)
+		ASM_GLOBAL_DIRECTIVE C_TEXT(_savef19)
+C_TEXT(_savef19):	stfd	fp19,-104(r11)
+		ASM_GLOBAL_DIRECTIVE C_TEXT(_savef20)
+C_TEXT(_savef20):	stfd	fp20,-96(r11)
+		ASM_GLOBAL_DIRECTIVE C_TEXT(_savef21)
+C_TEXT(_savef21):	stfd	fp21,-88(r11)
+		ASM_GLOBAL_DIRECTIVE C_TEXT(_savef22)
+C_TEXT(_savef22):	stfd	fp22,-80(r11)
+		ASM_GLOBAL_DIRECTIVE C_TEXT(_savef23)
+C_TEXT(_savef23):	stfd	fp23,-72(r11)
+		ASM_GLOBAL_DIRECTIVE C_TEXT(_savef24)
+C_TEXT(_savef24):	stfd	fp24,-64(r11)
+		ASM_GLOBAL_DIRECTIVE C_TEXT(_savef25)
+C_TEXT(_savef25):	stfd	fp25,-56(r11)
+		ASM_GLOBAL_DIRECTIVE C_TEXT(_savef26)
+C_TEXT(_savef26):	stfd	fp26,-48(r11)
+		ASM_GLOBAL_DIRECTIVE C_TEXT(_savef27)
+C_TEXT(_savef27):	stfd	fp27,-40(r11)
+		ASM_GLOBAL_DIRECTIVE C_TEXT(_savef28)
+C_TEXT(_savef28):	stfd	fp28,-32(r11)
+		ASM_GLOBAL_DIRECTIVE C_TEXT(_savef29)
+C_TEXT(_savef29):	stfd	fp29,-24(r11)
+		ASM_GLOBAL_DIRECTIVE C_TEXT(_savef30)
+C_TEXT(_savef30):	stfd	fp30,-16(r11)
+		ASM_GLOBAL_DIRECTIVE C_TEXT(_savef31)
+C_TEXT(_savef31):	stfd	fp31,-8(r11)
+		blr