svn commit: trunk/uClibc/libc: inet/rpc misc/dirent misc/glob misc/inte etc...

psm at uclibc.org psm at uclibc.org
Tue Dec 13 11:35:39 UTC 2005


Author: psm
Date: 2005-12-13 03:35:31 -0800 (Tue, 13 Dec 2005)
New Revision: 12870

Log:
Convert internal users of chmod/*stat*, minimize change for __strsep

Modified:
   trunk/uClibc/libc/inet/rpc/rcmd.c
   trunk/uClibc/libc/inet/rpc/ruserpass.c
   trunk/uClibc/libc/misc/dirent/opendir.c
   trunk/uClibc/libc/misc/glob/glob.c
   trunk/uClibc/libc/misc/internals/__uClibc_main.c
   trunk/uClibc/libc/misc/internals/tempname.c
   trunk/uClibc/libc/misc/statfs/fstatfs64.c
   trunk/uClibc/libc/misc/statfs/fstatvfs.c
   trunk/uClibc/libc/misc/statfs/fstatvfs64.c
   trunk/uClibc/libc/misc/statfs/internal_statvfs.c
   trunk/uClibc/libc/misc/statfs/statfs64.c
   trunk/uClibc/libc/misc/statfs/statvfs.c
   trunk/uClibc/libc/misc/statfs/statvfs64.c
   trunk/uClibc/libc/misc/sysvipc/ftok.c
   trunk/uClibc/libc/stdlib/ptsname.c
   trunk/uClibc/libc/stdlib/unix_grantpt.c
   trunk/uClibc/libc/sysdeps/linux/common/fstat.c
   trunk/uClibc/libc/sysdeps/linux/common/getcwd.c
   trunk/uClibc/libc/sysdeps/linux/common/getdirname.c
   trunk/uClibc/libc/sysdeps/linux/common/stat.c
   trunk/uClibc/libc/termios/ttyname.c
   trunk/uClibc/libc/unistd/fpathconf.c
   trunk/uClibc/libc/unistd/pathconf.c
   trunk/uClibc/libc/unistd/usershell.c


Changeset:
Modified: trunk/uClibc/libc/inet/rpc/rcmd.c
===================================================================
--- trunk/uClibc/libc/inet/rpc/rcmd.c	2005-12-13 11:28:16 UTC (rev 12869)
+++ trunk/uClibc/libc/inet/rpc/rcmd.c	2005-12-13 11:35:31 UTC (rev 12870)
@@ -385,7 +385,7 @@
      root, if writeable by anyone but the owner, or if hardlinked
      anywhere, quit.  */
   cp = NULL;
-  if (lstat (file, &st))
+  if (__lstat (file, &st))
     cp = "lstat failed";
   else if (!S_ISREG (st.st_mode))
     cp = "not regular file";
@@ -394,7 +394,7 @@
       res = fopen (file, "r");
       if (!res)
 	cp = "cannot open";
-      else if (fstat (fileno (res), &st) < 0)
+      else if (__fstat (fileno (res), &st) < 0)
 	cp = "fstat failed";
       else if (st.st_uid && st.st_uid != okuser)
 	cp = "bad owner";

Modified: trunk/uClibc/libc/inet/rpc/ruserpass.c
===================================================================
--- trunk/uClibc/libc/inet/rpc/ruserpass.c	2005-12-13 11:28:16 UTC (rev 12869)
+++ trunk/uClibc/libc/inet/rpc/ruserpass.c	2005-12-13 11:35:31 UTC (rev 12870)
@@ -182,7 +182,7 @@
 			break;
 		case PASSWD:
 			if (__strcmp(*aname, "anonymous") &&
-			    fstat(fileno(cfile), &stb) >= 0 &&
+			    __fstat(fileno(cfile), &stb) >= 0 &&
 			    (stb.st_mode & 077) != 0) {
 	__printf(_("Error: .netrc file is readable by others."));
 	__printf(_("Remove password or make file unreadable by others."));
@@ -201,7 +201,7 @@
 			break;
 		case ACCOUNT:
 #if 0
-			if (fstat(fileno(cfile), &stb) >= 0
+			if (__fstat(fileno(cfile), &stb) >= 0
 			    && (stb.st_mode & 077) != 0) {
 	__printf("Error: .netrc file is readable by others.");
 	__printf("Remove account or make file unreadable by others.");

Modified: trunk/uClibc/libc/misc/dirent/opendir.c
===================================================================
--- trunk/uClibc/libc/misc/dirent/opendir.c	2005-12-13 11:28:16 UTC (rev 12869)
+++ trunk/uClibc/libc/misc/dirent/opendir.c	2005-12-13 11:35:31 UTC (rev 12870)
@@ -18,7 +18,7 @@
 	char *buf;
 	DIR *ptr;
 
-	if (stat(name, &statbuf))
+	if (__stat(name, &statbuf))
 		return NULL;
 	if (!S_ISDIR(statbuf.st_mode)) {
 		__set_errno(ENOTDIR);

Modified: trunk/uClibc/libc/misc/glob/glob.c
===================================================================
--- trunk/uClibc/libc/misc/glob/glob.c	2005-12-13 11:28:16 UTC (rev 12869)
+++ trunk/uClibc/libc/misc/glob/glob.c	2005-12-13 11:35:31 UTC (rev 12870)
@@ -284,7 +284,7 @@
       int i;
       struct stat st;
       for (i = oldcount; i < pglob->gl_pathc; ++i)
-	if (lstat (pglob->gl_pathv[i], &st) == 0 &&
+	if (__lstat (pglob->gl_pathv[i], &st) == 0 &&
 	    S_ISDIR (st.st_mode))
 	  __strcat (pglob->gl_pathv[i], "/");
     }

Modified: trunk/uClibc/libc/misc/internals/__uClibc_main.c
===================================================================
--- trunk/uClibc/libc/misc/internals/__uClibc_main.c	2005-12-13 11:28:16 UTC (rev 12869)
+++ trunk/uClibc/libc/misc/internals/__uClibc_main.c	2005-12-13 11:35:31 UTC (rev 12870)
@@ -96,7 +96,7 @@
 	/* /dev/null is major=1 minor=3.  Make absolutely certain
 	 * that is in fact the device that we have opened and not
 	 * some other wierd file... */
-	if ( (nullfd!=fd) || fstat(fd, &st) || !S_ISCHR(st.st_mode) ||
+	if ( (nullfd!=fd) || __fstat(fd, &st) || !S_ISCHR(st.st_mode) ||
 		(st.st_rdev != makedev(1, 3)))
 	{
 	    /* Somebody is trying some trickery here... */

Modified: trunk/uClibc/libc/misc/internals/tempname.c
===================================================================
--- trunk/uClibc/libc/misc/internals/tempname.c	2005-12-13 11:28:16 UTC (rev 12869)
+++ trunk/uClibc/libc/misc/internals/tempname.c	2005-12-13 11:35:31 UTC (rev 12870)
@@ -54,7 +54,7 @@
 static int direxists (const char *dir)
 {
     struct stat buf;
-    return stat(dir, &buf) == 0 && S_ISDIR (buf.st_mode);
+    return __stat(dir, &buf) == 0 && S_ISDIR (buf.st_mode);
 }
 
 /* Path search algorithm, for tmpnam, tmpfile, etc.  If DIR is
@@ -212,7 +212,7 @@
 	    case __GT_NOCREATE:
 		{
 		    struct stat st;
-		    if (stat (tmpl, &st) < 0)
+		    if (__stat (tmpl, &st) < 0)
 		    {
 			if (errno == ENOENT)
 			{

Modified: trunk/uClibc/libc/misc/statfs/fstatfs64.c
===================================================================
--- trunk/uClibc/libc/misc/statfs/fstatfs64.c	2005-12-13 11:28:16 UTC (rev 12869)
+++ trunk/uClibc/libc/misc/statfs/fstatfs64.c	2005-12-13 11:35:31 UTC (rev 12870)
@@ -41,11 +41,11 @@
 #include <stddef.h>
 
 /* Return information about the filesystem on which FD resides.  */
-int fstatfs64 (int fd, struct statfs64 *buf)
+int attribute_hidden __fstatfs64 (int fd, struct statfs64 *buf)
 {
     struct statfs buf32;
 
-    if (fstatfs (fd, &buf32) < 0)
+    if (__fstatfs (fd, &buf32) < 0)
 	return -1;
 
     buf->f_type = buf32.f_type;
@@ -61,6 +61,6 @@
 
     return 0;
 }
+strong_alias(__fstatfs64,fstatfs64)
 
 #endif /* __UCLIBC_HAS_LFS__ */
-

Modified: trunk/uClibc/libc/misc/statfs/fstatvfs.c
===================================================================
--- trunk/uClibc/libc/misc/statfs/fstatvfs.c	2005-12-13 11:28:16 UTC (rev 12869)
+++ trunk/uClibc/libc/misc/statfs/fstatvfs.c	2005-12-13 11:35:31 UTC (rev 12870)
@@ -17,8 +17,6 @@
    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
    02111-1307 USA.  */
 
-#define strsep __strsep
-
 #include <features.h>
 
 #define __USE_GNU
@@ -37,10 +35,10 @@
     struct stat st;
 
     /* Get as much information as possible from the system.  */
-    if (fstatfs (fd, &fsbuf) < 0)
+    if (__fstatfs (fd, &fsbuf) < 0)
 	return -1;
 
-#define STAT(st) fstat (fd, st)
+#define STAT(st) __fstat (fd, st)
 #include "internal_statvfs.c"
 
     /* We signal success if the statfs call succeeded.  */

Modified: trunk/uClibc/libc/misc/statfs/fstatvfs64.c
===================================================================
--- trunk/uClibc/libc/misc/statfs/fstatvfs64.c	2005-12-13 11:28:16 UTC (rev 12869)
+++ trunk/uClibc/libc/misc/statfs/fstatvfs64.c	2005-12-13 11:35:31 UTC (rev 12870)
@@ -17,8 +17,6 @@
    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
    02111-1307 USA.  */
 
-#define strsep __strsep
-
 #include <features.h>
 
 #ifdef __UCLIBC_HAS_LFS__
@@ -50,10 +48,10 @@
     struct stat st;
 
     /* Get as much information as possible from the system.  */
-    if (fstatfs (fd, &fsbuf) < 0)
+    if (__fstatfs (fd, &fsbuf) < 0)
 	return -1;
 
-#define STAT(st) fstat (fd, st)
+#define STAT(st) __fstat (fd, st)
 #include "internal_statvfs.c"
 
     /* We signal success if the statfs call succeeded.  */

Modified: trunk/uClibc/libc/misc/statfs/internal_statvfs.c
===================================================================
--- trunk/uClibc/libc/misc/statfs/internal_statvfs.c	2005-12-13 11:28:16 UTC (rev 12869)
+++ trunk/uClibc/libc/misc/statfs/internal_statvfs.c	2005-12-13 11:35:31 UTC (rev 12870)
@@ -18,12 +18,18 @@
    02111-1307 USA.  */
 
 extern FILE *__setmntent (__const char *__file, __const char *__mode) __THROW attribute_hidden;
+
 extern struct mntent *__getmntent_r (FILE *__restrict __stream,
 				   struct mntent *__restrict __result,
 				   char *__restrict __buffer,
 				   int __bufsize) __THROW attribute_hidden;
+
 extern int __endmntent (FILE *__stream) __THROW attribute_hidden;
 
+extern char *__strsep (char **__restrict __stringp,
+		     __const char *__restrict __delim)
+     __THROW __nonnull ((1, 2)) attribute_hidden;
+
   /* Now fill in the fields we have information for.  */
   buf->f_bsize = fsbuf.f_bsize;
   /* Linux does not support f_frsize, so set it to the full block size.  */
@@ -77,7 +83,7 @@
 	      struct stat fsst;
 
 	      /* Find out about the device the current entry is for.  */
-	      if (stat (mntbuf.mnt_dir, &fsst) >= 0
+	      if (__stat (mntbuf.mnt_dir, &fsst) >= 0
 		  && st.st_dev == fsst.st_dev)
 		{
 		  /* Bingo, we found the entry for the device FD is on.
@@ -85,7 +91,7 @@
 		  char *cp = mntbuf.mnt_opts;
 		  char *opt;
 
-		  while ((opt = strsep (&cp, ",")) != NULL)
+		  while ((opt = __strsep (&cp, ",")) != NULL)
 		    if (__strcmp (opt, "ro") == 0)
 		      buf->f_flag |= ST_RDONLY;
 		    else if (__strcmp (opt, "nosuid") == 0)

Modified: trunk/uClibc/libc/misc/statfs/statfs64.c
===================================================================
--- trunk/uClibc/libc/misc/statfs/statfs64.c	2005-12-13 11:28:16 UTC (rev 12869)
+++ trunk/uClibc/libc/misc/statfs/statfs64.c	2005-12-13 11:35:31 UTC (rev 12870)
@@ -39,11 +39,11 @@
 #if defined __UCLIBC_HAS_LFS__
 
 /* Return information about the filesystem on which FILE resides.  */
-int statfs64 (const char *file, struct statfs64 *buf)
+int attribute_hidden __statfs64 (const char *file, struct statfs64 *buf)
 {
     struct statfs buf32;
 
-    if (statfs (file, &buf32) < 0)
+    if (__statfs (file, &buf32) < 0)
 	return -1;
 
     buf->f_type = buf32.f_type;
@@ -59,4 +59,6 @@
 
     return 0;
 }
+strong_alias(__statfs64,statfs64)
+
 #endif

Modified: trunk/uClibc/libc/misc/statfs/statvfs.c
===================================================================
--- trunk/uClibc/libc/misc/statfs/statvfs.c	2005-12-13 11:28:16 UTC (rev 12869)
+++ trunk/uClibc/libc/misc/statfs/statvfs.c	2005-12-13 11:35:31 UTC (rev 12870)
@@ -17,8 +17,6 @@
    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
    02111-1307 USA.  */
 
-#define strsep __strsep
-
 #include <features.h>
 
 #define __USE_GNU
@@ -31,17 +29,16 @@
 #include <sys/statfs.h>
 #include <sys/statvfs.h>
 
-
 int statvfs (const char *file, struct statvfs *buf)
 {
     struct statfs fsbuf;
     struct stat st;
 
     /* Get as much information as possible from the system.  */
-    if (statfs (file, &fsbuf) < 0)
+    if (__statfs (file, &fsbuf) < 0)
 	return -1;
 
-#define STAT(st) stat (file, st)
+#define STAT(st) __stat (file, st)
 #include "internal_statvfs.c"
 
     /* We signal success if the statfs call succeeded.  */

Modified: trunk/uClibc/libc/misc/statfs/statvfs64.c
===================================================================
--- trunk/uClibc/libc/misc/statfs/statvfs64.c	2005-12-13 11:28:16 UTC (rev 12869)
+++ trunk/uClibc/libc/misc/statfs/statvfs64.c	2005-12-13 11:35:31 UTC (rev 12870)
@@ -17,8 +17,6 @@
    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
    02111-1307 USA.  */
 
-#define strsep __strsep
-
 #include <features.h>
 
 #ifdef __UCLIBC_HAS_LFS__
@@ -51,10 +49,10 @@
     struct stat st;
 
     /* Get as much information as possible from the system.  */
-    if (statfs (file, &fsbuf) < 0)
+    if (__statfs (file, &fsbuf) < 0)
 	return -1;
 
-#define STAT(st) stat (file, st)
+#define STAT(st) __stat (file, st)
 #include "internal_statvfs.c"
 
     /* We signal success if the statfs call succeeded.  */

Modified: trunk/uClibc/libc/misc/sysvipc/ftok.c
===================================================================
--- trunk/uClibc/libc/misc/sysvipc/ftok.c	2005-12-13 11:28:16 UTC (rev 12869)
+++ trunk/uClibc/libc/misc/sysvipc/ftok.c	2005-12-13 11:35:31 UTC (rev 12870)
@@ -25,7 +25,7 @@
   struct stat st;
   key_t key;
 
-  if (stat(pathname, &st) < 0)
+  if (__stat(pathname, &st) < 0)
     return (key_t) -1;
 
   key = ((st.st_ino & 0xffff) | ((st.st_dev & 0xff) << 16)

Modified: trunk/uClibc/libc/stdlib/ptsname.c
===================================================================
--- trunk/uClibc/libc/stdlib/ptsname.c	2005-12-13 11:28:16 UTC (rev 12869)
+++ trunk/uClibc/libc/stdlib/ptsname.c	2005-12-13 11:35:31 UTC (rev 12870)
@@ -136,7 +136,7 @@
 	  return ERANGE;
 	}
 
-      if (fstat (fd, &st) < 0)
+      if (__fstat (fd, &st) < 0)
 	return errno;
 
       /* Check if FD really is a master pseudo terminal.  */
@@ -165,7 +165,7 @@
       p[2] = '\0';
     }
 
-  if (stat(buf, &st) < 0)
+  if (__stat(buf, &st) < 0)
     return errno;
 
   /* Check if the name we're about to return really corresponds to a

Modified: trunk/uClibc/libc/stdlib/unix_grantpt.c
===================================================================
--- trunk/uClibc/libc/stdlib/unix_grantpt.c	2005-12-13 11:28:16 UTC (rev 12869)
+++ trunk/uClibc/libc/stdlib/unix_grantpt.c	2005-12-13 11:35:31 UTC (rev 12870)
@@ -23,6 +23,7 @@
 #define setrlimit __setrlimit
 #define waitpid __waitpid
 #define dup2 __dup2
+#define chmod __chmod
 
 #include <assert.h>
 #include <errno.h>
@@ -119,7 +120,7 @@
   if (pts_name (fd, &buf, sizeof (_buf)))
     return -1;
 
-  if (stat(buf, &st) < 0)
+  if (__stat(buf, &st) < 0)
     goto cleanup;
 
   /* Make sure that we own the device.  */

Modified: trunk/uClibc/libc/sysdeps/linux/common/fstat.c
===================================================================
--- trunk/uClibc/libc/sysdeps/linux/common/fstat.c	2005-12-13 11:28:16 UTC (rev 12869)
+++ trunk/uClibc/libc/sysdeps/linux/common/fstat.c	2005-12-13 11:35:31 UTC (rev 12870)
@@ -31,5 +31,6 @@
 strong_alias(__fstat,fstat)
 
 #if ! defined __NR_fstat64 && defined __UCLIBC_HAS_LFS__
-weak_alias(fstat,fstat64)
+hidden_strong_alias(__fstat,__fstat64)
+weak_alias(__fstat,fstat64)
 #endif

Modified: trunk/uClibc/libc/sysdeps/linux/common/getcwd.c
===================================================================
--- trunk/uClibc/libc/sysdeps/linux/common/getcwd.c	2005-12-13 11:28:16 UTC (rev 12869)
+++ trunk/uClibc/libc/sysdeps/linux/common/getcwd.c	2005-12-13 11:35:31 UTC (rev 12870)
@@ -42,7 +42,7 @@
 	int slow_search = (sizeof(ino_t) != sizeof(d->d_ino));
 #endif
 
-	if (stat(path_buf, &st) < 0) {
+	if (__stat(path_buf, &st) < 0) {
 		goto oops;
 	}
 #ifdef FAST_DIR_SEARCH_POSSIBLE
@@ -74,7 +74,7 @@
 			    goto oops;
 			}
 			__strcpy(ptr + 1, d->d_name);
-			if (stat(path_buf, &st) < 0)
+			if (__stat(path_buf, &st) < 0)
 				continue;
 			if (st.st_ino == this_ino && st.st_dev == this_dev) {
 				closedir(dp);
@@ -100,7 +100,7 @@
 	dev_t this_dev;
 	ino_t this_ino;
 
-	if (stat(path_buf, &st) < 0) {
+	if (__stat(path_buf, &st) < 0) {
 	    if (errno != EFAULT)
 		goto oops;
 	    return 0;
@@ -139,7 +139,7 @@
     len = -1;
 
     /* get stat for root to have a valid parameters for the terminating condition */
-    if (stat("/", &st) < 0) {
+    if (__stat("/", &st) < 0) {
 	/* root dir not found! */
 	return -1;
     }

Modified: trunk/uClibc/libc/sysdeps/linux/common/getdirname.c
===================================================================
--- trunk/uClibc/libc/sysdeps/linux/common/getdirname.c	2005-12-13 11:28:16 UTC (rev 12869)
+++ trunk/uClibc/libc/sysdeps/linux/common/getdirname.c	2005-12-13 11:35:31 UTC (rev 12870)
@@ -42,11 +42,11 @@
 	pwd = __getenv ("PWD");
 	if (pwd != NULL
 #if defined __UCLIBC_HAS_LFS__
-		&& stat64 (".", &dotstat) == 0
-		&& stat64 (pwd, &pwdstat) == 0
+		&& __stat64 (".", &dotstat) == 0
+		&& __stat64 (pwd, &pwdstat) == 0
 #else
-		&& stat (".", &dotstat) == 0
-		&& stat (pwd, &pwdstat) == 0
+		&& __stat (".", &dotstat) == 0
+		&& __stat (pwd, &pwdstat) == 0
 #endif
 		&& pwdstat.st_dev == dotstat.st_dev
 		&& pwdstat.st_ino == dotstat.st_ino)

Modified: trunk/uClibc/libc/sysdeps/linux/common/stat.c
===================================================================
--- trunk/uClibc/libc/sysdeps/linux/common/stat.c	2005-12-13 11:28:16 UTC (rev 12869)
+++ trunk/uClibc/libc/sysdeps/linux/common/stat.c	2005-12-13 11:35:31 UTC (rev 12870)
@@ -31,5 +31,6 @@
 strong_alias(__stat,stat)
 
 #if ! defined __NR_stat64 && defined __UCLIBC_HAS_LFS__
-weak_alias(stat,stat64)
+hidden_strong_alias(__stat,__stat64)
+weak_alias(__stat,stat64)
 #endif

Modified: trunk/uClibc/libc/termios/ttyname.c
===================================================================
--- trunk/uClibc/libc/termios/ttyname.c	2005-12-13 11:28:16 UTC (rev 12869)
+++ trunk/uClibc/libc/termios/ttyname.c	2005-12-13 11:35:31 UTC (rev 12870)
@@ -50,7 +50,7 @@
 	size_t len;
 	char buf[TTYNAME_BUFLEN];
 
-	if (fstat(fd, &st) < 0) {
+	if (__fstat(fd, &st) < 0) {
 		return errno;
 	}
 
@@ -82,7 +82,7 @@
 
 			__strcpy(s, d->d_name);
 
-			if ((lstat(buf, &dst) == 0)
+			if ((__lstat(buf, &dst) == 0)
 #if 0
 				/* Stupid filesystems like cramfs fail to guarantee that
 				 * st_ino and st_dev uniquely identify a file, contrary to

Modified: trunk/uClibc/libc/unistd/fpathconf.c
===================================================================
--- trunk/uClibc/libc/unistd/fpathconf.c	2005-12-13 11:28:16 UTC (rev 12869)
+++ trunk/uClibc/libc/unistd/fpathconf.c	2005-12-13 11:35:31 UTC (rev 12870)
@@ -53,7 +53,7 @@
 	struct statfs fsbuf;
 
 	/* Determine the filesystem type.  */
-	if (fstatfs (fd, &fsbuf) < 0)
+	if (__fstatfs (fd, &fsbuf) < 0)
 	{
 	    if (errno == ENOSYS)
 		/* not possible, return the default value.  */
@@ -127,7 +127,7 @@
 		struct statfs buf;
 		int save_errno = errno;
 
-		if (fstatfs (fd, &buf) < 0)
+		if (__fstatfs (fd, &buf) < 0)
 		{
 		    if (errno == ENOSYS)
 		    {
@@ -201,7 +201,7 @@
 		/* AIO is only allowed on regular files and block devices.  */
 		struct stat st;
 
-		if (fstat (fd, &st) < 0 || (! S_ISREG (st.st_mode) && ! S_ISBLK (st.st_mode)))
+		if (__fstat (fd, &st) < 0 || (! S_ISREG (st.st_mode) && ! S_ISBLK (st.st_mode)))
 		    return -1;
 		else
 		    return 1;

Modified: trunk/uClibc/libc/unistd/pathconf.c
===================================================================
--- trunk/uClibc/libc/unistd/pathconf.c	2005-12-13 11:28:16 UTC (rev 12869)
+++ trunk/uClibc/libc/unistd/pathconf.c	2005-12-13 11:35:31 UTC (rev 12870)
@@ -57,7 +57,7 @@
 	struct statfs fsbuf;
 
 	/* Determine the filesystem type.  */
-	if (statfs (path, &fsbuf) < 0)
+	if (__statfs (path, &fsbuf) < 0)
 	{
 	    if (errno == ENOSYS)
 		/* not possible, return the default value.  */
@@ -131,7 +131,7 @@
 		struct statfs buf;
 		int save_errno = errno;
 
-		if (statfs (path, &buf) < 0)
+		if (__statfs (path, &buf) < 0)
 		{
 		    if (errno == ENOSYS)
 		    {
@@ -205,7 +205,7 @@
 		/* AIO is only allowed on regular files and block devices.  */
 		struct stat st;
 
-		if (stat (path, &st) < 0 || (! S_ISREG (st.st_mode) && ! S_ISBLK (st.st_mode)))
+		if (__stat (path, &st) < 0 || (! S_ISREG (st.st_mode) && ! S_ISBLK (st.st_mode)))
 		    return -1;
 		else
 		    return 1;

Modified: trunk/uClibc/libc/unistd/usershell.c
===================================================================
--- trunk/uClibc/libc/unistd/usershell.c	2005-12-13 11:28:16 UTC (rev 12869)
+++ trunk/uClibc/libc/unistd/usershell.c	2005-12-13 11:35:31 UTC (rev 12870)
@@ -103,7 +103,7 @@
 
     if ((fp = fopen(_PATH_SHELLS, "r")) == NULL)
 	return (char **) validsh;
-    if (fstat(fileno(fp), &statb) == -1) {
+    if (__fstat(fileno(fp), &statb) == -1) {
 	goto cleanup;
     }
     if ((strings = malloc((unsigned)statb.st_size + 1)) == NULL) {




More information about the uClibc-cvs mailing list