diff options
| author | "Steven J. Hill" <sjhill@realitydiluted.com> | 2005-12-02 00:41:37 +0000 |
|---|---|---|
| committer | "Steven J. Hill" <sjhill@realitydiluted.com> | 2005-12-02 00:41:37 +0000 |
| commit | 9acef89e60381a298801e4b221d66b1538072b28 (patch) | |
| tree | 76643b24b4f8fc6590e392672102e5b30499ba73 /libc/misc/dirent | |
| parent | a4a74b5760c426cede2ef36d35cb873f98b9f17b (diff) | |
| download | uClibc-alpine-9acef89e60381a298801e4b221d66b1538072b28.tar.bz2 uClibc-alpine-9acef89e60381a298801e4b221d66b1538072b28.tar.xz | |
Merge from trunk. More to come you betcha'.
Diffstat (limited to 'libc/misc/dirent')
| -rw-r--r-- | libc/misc/dirent/Makefile | 48 | ||||
| -rw-r--r-- | libc/misc/dirent/alphasort.c | 2 | ||||
| -rw-r--r-- | libc/misc/dirent/alphasort64.c | 2 | ||||
| -rw-r--r-- | libc/misc/dirent/closedir.c | 2 | ||||
| -rw-r--r-- | libc/misc/dirent/opendir.c | 6 | ||||
| -rw-r--r-- | libc/misc/dirent/readdir64_r.c | 2 | ||||
| -rw-r--r-- | libc/misc/dirent/readdir_r.c | 2 | ||||
| -rw-r--r-- | libc/misc/dirent/scandir.c | 2 | ||||
| -rw-r--r-- | libc/misc/dirent/scandir64.c | 2 |
9 files changed, 18 insertions, 50 deletions
diff --git a/libc/misc/dirent/Makefile b/libc/misc/dirent/Makefile index 1f1032642..4a8f4a072 100644 --- a/libc/misc/dirent/Makefile +++ b/libc/misc/dirent/Makefile @@ -1,45 +1,13 @@ # Makefile for uClibc # -# Copyright (C) 2001 by Lineo, inc. -# Copyright (C) 2000,2001 Erik Andersen <andersen@uclibc.org> +# Copyright (C) 2000-2005 Erik Andersen <andersen@uclibc.org> # -# This program 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. +# Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. # -# This program 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 this program; if not, write to the Free Software Foundation, Inc., -# 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -# -# Derived in part from the Linux-8086 C library, the GNU C Library, and several -# other sundry sources. Files within this library are copyright by their -# respective copyright holders. - -TOPDIR=../../../ -include $(TOPDIR)Rules.mak - -CSRC=alphasort.c closedir.c dirfd.c opendir.c readdir.c rewinddir.c scandir.c \ - seekdir.c telldir.c readdir64.c alphasort64.c scandir64.c readdir_r.c \ - readdir64_r.c -COBJS=$(patsubst %.c,%.o, $(CSRC)) -OBJS=$(COBJS) - -OBJ_LIST=../../obj.misc.dirent - -all: $(OBJ_LIST) - -$(OBJ_LIST): $(OBJS) - echo $(patsubst %, misc/dirent/%, $(OBJS)) > $(OBJ_LIST) - -$(COBJS): %.o : %.c - $(CC) $(CFLAGS) -c $< -o $@ - $(STRIPTOOL) -x -R .note -R .comment $*.o -clean: - $(RM) *.[oa] *~ core +top_srcdir=../../../ +top_builddir=../../../ +all: objs +include $(top_builddir)Rules.mak +include Makefile.in +include $(top_srcdir)Makerules diff --git a/libc/misc/dirent/alphasort.c b/libc/misc/dirent/alphasort.c index dcf970070..feae021e6 100644 --- a/libc/misc/dirent/alphasort.c +++ b/libc/misc/dirent/alphasort.c @@ -4,7 +4,7 @@ int alphasort(const void * a, const void * b) { - return strcmp ((*(const struct dirent **) a)->d_name, + return __strcmp ((*(const struct dirent **) a)->d_name, (*(const struct dirent **) b)->d_name); } diff --git a/libc/misc/dirent/alphasort64.c b/libc/misc/dirent/alphasort64.c index bcae8108f..5801f4940 100644 --- a/libc/misc/dirent/alphasort64.c +++ b/libc/misc/dirent/alphasort64.c @@ -19,7 +19,7 @@ int alphasort64(const void * a, const void * b) { - return strcmp ((*(const struct dirent64 **) a)->d_name, + return __strcmp ((*(const struct dirent64 **) a)->d_name, (*(const struct dirent64 **) b)->d_name); } #endif /* __UCLIBC_HAS_LFS__ */ diff --git a/libc/misc/dirent/closedir.c b/libc/misc/dirent/closedir.c index 068e2d3e2..57600ab69 100644 --- a/libc/misc/dirent/closedir.c +++ b/libc/misc/dirent/closedir.c @@ -29,5 +29,5 @@ int closedir(DIR * dir) #endif free(dir->dd_buf); free(dir); - return close(fd); + return __close(fd); } diff --git a/libc/misc/dirent/opendir.c b/libc/misc/dirent/opendir.c index 017684b40..9f5f75e3f 100644 --- a/libc/misc/dirent/opendir.c +++ b/libc/misc/dirent/opendir.c @@ -24,7 +24,7 @@ DIR *opendir(const char *name) __set_errno(ENOTDIR); return NULL; } - if ((fd = open(name, O_RDONLY)) < 0) + if ((fd = __open(name, O_RDONLY)) < 0) return NULL; /* According to POSIX, directory streams should be closed when * exec. From "Anna Pluzhnikov" <besp@midway.uchicago.edu>. @@ -32,7 +32,7 @@ DIR *opendir(const char *name) if (fcntl(fd, F_SETFD, FD_CLOEXEC) < 0) return NULL; if (!(ptr = malloc(sizeof(*ptr)))) { - close(fd); + __close(fd); __set_errno(ENOMEM); return NULL; } @@ -45,7 +45,7 @@ DIR *opendir(const char *name) ptr->dd_max = 512; if (!(buf = calloc(1, ptr->dd_max))) { - close(fd); + __close(fd); free(ptr); __set_errno(ENOMEM); return NULL; diff --git a/libc/misc/dirent/readdir64_r.c b/libc/misc/dirent/readdir64_r.c index da3564edb..1daae5116 100644 --- a/libc/misc/dirent/readdir64_r.c +++ b/libc/misc/dirent/readdir64_r.c @@ -62,7 +62,7 @@ int readdir64_r(DIR *dir, struct dirent64 *entry, struct dirent64 **result) if (de == NULL) { *result = NULL; } else { - *result = memcpy (entry, de, de->d_reclen); + *result = __memcpy (entry, de, de->d_reclen); } ret = 0; diff --git a/libc/misc/dirent/readdir_r.c b/libc/misc/dirent/readdir_r.c index 245dcbdde..1c8eeadce 100644 --- a/libc/misc/dirent/readdir_r.c +++ b/libc/misc/dirent/readdir_r.c @@ -48,7 +48,7 @@ int readdir_r(DIR *dir, struct dirent *entry, struct dirent **result) if (de == NULL) { *result = NULL; } else { - *result = memcpy (entry, de, de->d_reclen); + *result = __memcpy (entry, de, de->d_reclen); } ret = 0; diff --git a/libc/misc/dirent/scandir.c b/libc/misc/dirent/scandir.c index cb3d505db..8b08e4884 100644 --- a/libc/misc/dirent/scandir.c +++ b/libc/misc/dirent/scandir.c @@ -72,7 +72,7 @@ int scandir(const char *dir, struct dirent ***namelist, if (vnew == NULL) break; - names[pos++] = (struct dirent *) memcpy (vnew, current, dsize); + names[pos++] = (struct dirent *) __memcpy (vnew, current, dsize); } if (unlikely(errno != 0)) diff --git a/libc/misc/dirent/scandir64.c b/libc/misc/dirent/scandir64.c index b4cc57a36..2916285eb 100644 --- a/libc/misc/dirent/scandir64.c +++ b/libc/misc/dirent/scandir64.c @@ -87,7 +87,7 @@ int scandir64(const char *dir, struct dirent64 ***namelist, if (vnew == NULL) break; - names[pos++] = (struct dirent64 *) memcpy (vnew, current, dsize); + names[pos++] = (struct dirent64 *) __memcpy (vnew, current, dsize); } if (unlikely(errno != 0)) |
