about summary refs log tree commit diff
path: root/io
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>1998-09-09 11:53:19 +0000
committerUlrich Drepper <drepper@redhat.com>1998-09-09 11:53:19 +0000
commit6e4c40baacfd7eaf1578f707759d79b5d95d626c (patch)
treeebea3ca25b71a1f21e657b7ab8a506f640197d79 /io
parent7fd18ea2de82bb4f0e393aee1dc412cd025f3be8 (diff)
downloadglibc-6e4c40baacfd7eaf1578f707759d79b5d95d626c.tar.gz
glibc-6e4c40baacfd7eaf1578f707759d79b5d95d626c.tar.xz
glibc-6e4c40baacfd7eaf1578f707759d79b5d95d626c.zip
Update.
1998-09-09 09:32  Ulrich Drepper  <drepper@cygnus.com>

	* sysdeps/powerpc/dl-machine.h (elf_machine_rela): Make function
	inline.

1998-09-07  Paul Eggert  <eggert@twinsun.com>

	* time/mktime.c (__EXTENSIONS__): Define if not defined.
	(_REENTRANT): Remove.  It has undesirable consequences in
	Solaris 2.6 (e.g. it turns off the putc macro).  Defining
	__EXTENSIONS__ makes localtime_r and gmtime_r visible, which
	is what we want.
	* time/strftime.c: Likewise.

1998-09-08  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>

	* elf/dl-error.c: Fix spelling.

1998-09-08  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>

	* stdlib/strfmon.c: Quiet -Wparentheses warnings.
	* stdio-common/_itoa.c: Likewise.
	* stdio-common/printf_fp.c: Likewise.
	* stdio-common/vfscanf.c: Likewise.
	* wcsmbs/wcstok.c: Likewise.
	* sysdeps/generic/glob.c: Likewise.
	* posix/getopt.c: Likewise.
	* sysdeps/posix/getaddrinfo.c: Likewise.
	* posix/wordexp.c: Likewise.
	* io/ftw.c: Likewise.
	* io/fts.c: Likewise.
	* misc/getpass.c: Likewise.
	* iconv/gconv_conf.c: Likewise.
	* argp/argp-fmtstream.c: Likewise.
	* argp/argp-help.c: Likewise.
	* elf/dl-load.c: Likewise.
	* locale/programs/stringtrans.c: Likewise.
	* catgets/gencat.c: Likewise.
	* posix/getconf.c: Likewise.
	* iconv/gconv_conf.c: Likewise.
	* iconv/iconv_prog.c: Likewise.

	* string/strcoll.c: Optimize a few expressions.
	* string/strxfrm.c: Likewise.

1998-09-08  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>

	* elf/dl-open.c (dl_open_worker): Move decl of new_global up one
	level to avoid uninit variable warning.

1998-09-09 10:34  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
	instead of _dl_default_scope[2] as argument to _dl_init_next.
	Fix compatibility problems introduced in last change.
Diffstat (limited to 'io')
-rw-r--r--io/fts.c10
-rw-r--r--io/ftw.c80
2 files changed, 47 insertions, 43 deletions
diff --git a/io/fts.c b/io/fts.c
index 4c570846fa..4ce6527441 100644
--- a/io/fts.c
+++ b/io/fts.c
@@ -313,12 +313,13 @@ fts_read(sp)
 	if (instr == FTS_FOLLOW &&
 	    (p->fts_info == FTS_SL || p->fts_info == FTS_SLNONE)) {
 		p->fts_info = fts_stat(sp, NULL, p, 1);
-		if (p->fts_info == FTS_D && !ISSET(FTS_NOCHDIR))
+		if (p->fts_info == FTS_D && !ISSET(FTS_NOCHDIR)) {
 			if ((p->fts_symfd = __open(".", O_RDONLY, 0)) < 0) {
 				p->fts_errno = errno;
 				p->fts_info = FTS_ERR;
 			} else
 				p->fts_flags |= FTS_SYMFOLLOW;
+		}
 		return (p);
 	}
 
@@ -401,13 +402,14 @@ next:	tmp = p;
 			goto next;
 		if (p->fts_instr == FTS_FOLLOW) {
 			p->fts_info = fts_stat(sp, NULL, p, 1);
-			if (p->fts_info == FTS_D && !ISSET(FTS_NOCHDIR))
+			if (p->fts_info == FTS_D && !ISSET(FTS_NOCHDIR)) {
 				if ((p->fts_symfd =
 				    __open(".", O_RDONLY, 0)) < 0) {
 					p->fts_errno = errno;
 					p->fts_info = FTS_ERR;
 				} else
 					p->fts_flags |= FTS_SYMFOLLOW;
+			}
 			p->fts_instr = FTS_NOINSTR;
 		}
 
@@ -641,7 +643,7 @@ fts_build(sp, type)
 	 * checking FTS_NS on the returned nodes.
 	 */
 	cderrno = 0;
-	if (nlinks || type == BREAD)
+	if (nlinks || type == BREAD) {
 		if (FCHDIR(sp, dirfd(dirp))) {
 			if (nlinks && type == BREAD)
 				cur->fts_errno = errno;
@@ -650,7 +652,7 @@ fts_build(sp, type)
 			cderrno = errno;
 		} else
 			descend = 1;
-	else
+	} else
 		descend = 0;
 
 	/*
diff --git a/io/ftw.c b/io/ftw.c
index db687e3dbd..e012ded938 100644
--- a/io/ftw.c
+++ b/io/ftw.c
@@ -547,46 +547,48 @@ ftw_startup (const char *dir, int is_nftw, void *func, int descriptors,
 
   /* Get stat info for start directory.  */
   if (result == 0)
-    if (((flags & FTW_PHYS)
-	 ? LXSTAT (_STAT_VER, data.dirbuf, &st)
-	 : XSTAT (_STAT_VER, data.dirbuf, &st)) < 0)
-      {
-	if (errno == EACCES)
-	  result = (*data.func) (data.dirbuf, &st, FTW_NS, &data.ftw);
-	else if (!(flags & FTW_PHYS)
-		 && errno == ENOENT
-		 && LXSTAT (_STAT_VER, dir, &st) == 0
-		 && S_ISLNK (st.st_mode))
-	  result = (*data.func) (data.dirbuf, &st, data.cvt_arr[FTW_SLN],
-				 &data.ftw);
-	else
-	  /* No need to call the callback since we cannot say anything
-	     about the object.  */
-	  result = -1;
-      }
-    else
-      {
-	if (S_ISDIR (st.st_mode))
-	  {
-	    /* Remember the device of the initial directory in case
-	       FTW_MOUNT is given.  */
-	    data.dev = st.st_dev;
-
-	    /* We know this directory now.  */
-	    if (!(flags & FTW_PHYS))
-	      result = add_object (&data, &st);
-
-	    if (result == 0)
-	      result = ftw_dir (&data, &st);
-	  }
-	else
-	  {
-	    int flag = S_ISLNK (st.st_mode) ? FTW_SL : FTW_F;
-
-	    result = (*data.func) (data.dirbuf, &st, data.cvt_arr[flag],
+    {
+      if (((flags & FTW_PHYS)
+	   ? LXSTAT (_STAT_VER, data.dirbuf, &st)
+	   : XSTAT (_STAT_VER, data.dirbuf, &st)) < 0)
+	{
+	  if (errno == EACCES)
+	    result = (*data.func) (data.dirbuf, &st, FTW_NS, &data.ftw);
+	  else if (!(flags & FTW_PHYS)
+		   && errno == ENOENT
+		   && LXSTAT (_STAT_VER, dir, &st) == 0
+		   && S_ISLNK (st.st_mode))
+	    result = (*data.func) (data.dirbuf, &st, data.cvt_arr[FTW_SLN],
 				   &data.ftw);
-	  }
-      }
+	  else
+	    /* No need to call the callback since we cannot say anything
+	       about the object.  */
+	    result = -1;
+	}
+      else
+	{
+	  if (S_ISDIR (st.st_mode))
+	    {
+	      /* Remember the device of the initial directory in case
+		 FTW_MOUNT is given.  */
+	      data.dev = st.st_dev;
+
+	      /* We know this directory now.  */
+	      if (!(flags & FTW_PHYS))
+		result = add_object (&data, &st);
+
+	      if (result == 0)
+		result = ftw_dir (&data, &st);
+	    }
+	  else
+	    {
+	      int flag = S_ISLNK (st.st_mode) ? FTW_SL : FTW_F;
+
+	      result = (*data.func) (data.dirbuf, &st, data.cvt_arr[flag],
+				     &data.ftw);
+	    }
+	}
+    }
 
   /* Return to the start directory (if necessary).  */
   if (cwd != NULL)