summary refs log tree commit diff
path: root/sysdeps/unix/opendir.c
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>1996-02-19 20:54:38 +0000
committerRoland McGrath <roland@gnu.org>1996-02-19 20:54:38 +0000
commitbe10a86854716071a64f559e1f5bc94e145d0fdb (patch)
treee7abce4d5ba8da4ff17dad3510c4bea6cb3e037e /sysdeps/unix/opendir.c
parent1cbca0d93c6c1507c4e69a21e60c77e704b7e1da (diff)
downloadglibc-be10a86854716071a64f559e1f5bc94e145d0fdb.tar.gz
glibc-be10a86854716071a64f559e1f5bc94e145d0fdb.tar.xz
glibc-be10a86854716071a64f559e1f5bc94e145d0fdb.zip
*** empty log message ***
Mon Feb 19 15:30:26 1996  Roland McGrath  <roland@charlie-brown.gnu.ai.mit.edu>

	* stdio-common/tstscanf.c (main): Add check for "0" as %d.

	* sysdeps/stub/msync.c: Undo change of Jan 29; just two args.
	Only some systems have three args; let them define their own stub.

	* sysdeps/generic/dl-sysdep.c: Declare _dl_secure.

	* sysdeps/generic/machine-gmon.h: New file.
	* gmon/Makefile (distribute): Add machine-gmon.h.
	* gmon/mcount.c: Undo changes of Feb 13.
	Include "machine-gmon.h".

Sun Feb 18 13:24:06 1996  Roland McGrath  <roland@charlie-brown.gnu.ai.mit.edu>

	* sysdeps/unix/sysv/linux/direct.h: File removed, since it is
	identical to unix/common/direct.h.

	* sysdeps/unix/Makefile [no_deps]: Don't include s-proto.d.

	* sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Don't add ipc.

	* stdio-common/Makefile (tests): Remove scanf6.

	* sysdeps/unix/sysv/linux/Makefile (non-lib.a): Append libieee.a.

	* time/mktime.c (mktime): Move static variable localtime_offset to
	file scope.

	* stdio-common/vfscanf.c: Put '0' in buffer before scanning for %i
	base indicator.

Thu Feb 15 16:56:17 1996  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>

	* sysdeps/m68k/dl-machine.h (elf_machine_load_address): Corrected.
	(ELF_MACHINE_BEFORE_RTLD_RELOC): Define.
	(_dl_runtime_resolve): Save %a1 as well.
	(ELF_MACHINE_RUNTIME_FIXUP_ARGS): Add second dummy arg.
	(elf_machine_relplt): Define.

	* elf/dl-runtime.c: Include possible extra args in declaration of
 	fixup.
Diffstat (limited to 'sysdeps/unix/opendir.c')
-rw-r--r--sysdeps/unix/opendir.c26
1 files changed, 12 insertions, 14 deletions
diff --git a/sysdeps/unix/opendir.c b/sysdeps/unix/opendir.c
index 5cd620676a..31111e8c50 100644
--- a/sysdeps/unix/opendir.c
+++ b/sysdeps/unix/opendir.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1992, 1993, 1994, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 92, 93, 94, 95, 96 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
@@ -16,7 +16,6 @@ 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.  */
 
-#include <ansidecl.h>
 #include <errno.h>
 #include <limits.h>
 #include <stddef.h>
@@ -28,12 +27,11 @@ Cambridge, MA 02139, USA.  */
 #include <unistd.h>
 #include <stdio.h>
 
-#include "direct.h"		/* This file defines `struct direct'.  */
 #include "dirstream.h"
 
 /* Open a directory stream on NAME.  */
 DIR *
-DEFUN(opendir, (name), CONST char *name)
+opendir (const char *name)
 {
   DIR *dirp;
   struct stat statbuf;
@@ -62,7 +60,7 @@ DEFUN(opendir, (name), CONST char *name)
       goto lose;
     }
 
-  dirp = (DIR *) calloc (1, sizeof (DIR) + NAME_MAX); /* Zero-fill.  */
+  dirp = (DIR *) calloc (1, sizeof (DIR)); /* Zero-fill.  */
   if (dirp == NULL)
   lose:
     {
@@ -73,24 +71,24 @@ DEFUN(opendir, (name), CONST char *name)
     }
 
 #ifdef _STATBUF_ST_BLKSIZE
-  if (statbuf.st_blksize < sizeof (struct direct))
-    dirp->__allocation = sizeof (struct direct);
+  if (statbuf.st_blksize < sizeof (struct dirent))
+    dirp->allocation = sizeof (struct dirent);
   else
-    dirp->__allocation = statbuf.st_blksize;
+    dirp->allocation = statbuf.st_blksize;
 #else
-  dirp->__allocation = (BUFSIZ < sizeof (struct direct) ?
-			sizeof (struct direct) : BUFSIZ);
+  dirp->allocation = (BUFSIZ < sizeof (struct dirent) ?
+		      sizeof (struct dirent) : BUFSIZ);
 #endif
-  dirp->__data = (char *) malloc (dirp->__allocation);
-  if (dirp->__data == NULL)
+  dirp->data = (char *) malloc (dirp->allocation);
+  if (dirp->data == NULL)
     {
       int save = errno;
-      free ((PTR) dirp);
+      free (dirp);
       (void) __close (fd);
       errno = save;
       return NULL;
     }
 
-  dirp->__fd = fd;
+  dirp->fd = fd;
   return dirp;
 }