summaryrefslogtreecommitdiff
path: root/libc/misc
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@openadk.org>2016-11-27 22:31:25 +0100
committerWaldemar Brodkorb <wbx@openadk.org>2016-11-27 22:32:11 +0100
commit74ca8d6f5d2e29bb7cf4606531313ee8c52b9eda (patch)
treeb2e5ad49c4499ca7c21a92e4d4c3e3aced7cb524 /libc/misc
parentd9f4c6bb0568da6d80f60a0040354f45478f84a3 (diff)
remove UCLIBC_HAS_LFS
Diffstat (limited to 'libc/misc')
-rw-r--r--libc/misc/dirent/Makefile.in4
-rw-r--r--libc/misc/dirent/alphasort.c2
-rw-r--r--libc/misc/dirent/readdir.c2
-rw-r--r--libc/misc/dirent/readdir_r.c2
-rw-r--r--libc/misc/dirent/scandir.c2
-rw-r--r--libc/misc/dirent/versionsort.c2
-rw-r--r--libc/misc/file/Makefile.in4
-rw-r--r--libc/misc/file/isfdtype.c7
-rw-r--r--libc/misc/fts/fts.c9
-rw-r--r--libc/misc/ftw/Makefile.in3
-rw-r--r--libc/misc/ftw/ftw.c8
-rw-r--r--libc/misc/glob/Makefile.in2
-rw-r--r--libc/misc/glob/glob-susv3.c8
-rw-r--r--libc/misc/glob/glob.c6
-rw-r--r--libc/misc/internals/tempname.c2
-rw-r--r--libc/misc/statfs/Makefile.in7
-rw-r--r--libc/misc/sysvipc/ftok.c6
17 files changed, 19 insertions, 57 deletions
diff --git a/libc/misc/dirent/Makefile.in b/libc/misc/dirent/Makefile.in
index 5cae8d44d..90cdc25d4 100644
--- a/libc/misc/dirent/Makefile.in
+++ b/libc/misc/dirent/Makefile.in
@@ -11,8 +11,8 @@ CSRC := alphasort.c readdir.c scandir.c versionsort.c
CSRC_R := readdir_r.c
CSRC-y := closedir.c dirfd.c opendir.c rewinddir.c seekdir.c telldir.c $(CSRC) \
$(CSRC_R)
-CSRC-$(UCLIBC_HAS_LFS) += $(patsubst %.c,%64.c,$(CSRC))
-CSRC-$(UCLIBC_HAS_LFS) += $(patsubst %_r.c,%64_r.c,$(CSRC_R))
+CSRC-y += $(patsubst %.c,%64.c,$(CSRC))
+CSRC-y += $(patsubst %_r.c,%64_r.c,$(CSRC_R))
MISC_DIRENT_DIR := $(top_srcdir)libc/misc/dirent
MISC_DIRENT_OUT := $(top_builddir)libc/misc/dirent
diff --git a/libc/misc/dirent/alphasort.c b/libc/misc/dirent/alphasort.c
index 67b3b7859..de9bf4dfb 100644
--- a/libc/misc/dirent/alphasort.c
+++ b/libc/misc/dirent/alphasort.c
@@ -12,6 +12,6 @@ int alphasort(const struct dirent **a, const struct dirent **b)
{
return strcoll((*a)->d_name, (*b)->d_name);
}
-#if defined __UCLIBC_HAS_LFS__ && __WORDSIZE == 64
+#if __WORDSIZE == 64
strong_alias_untyped(alphasort,alphasort64)
#endif
diff --git a/libc/misc/dirent/readdir.c b/libc/misc/dirent/readdir.c
index 75171064d..52fd26b62 100644
--- a/libc/misc/dirent/readdir.c
+++ b/libc/misc/dirent/readdir.c
@@ -56,7 +56,7 @@ all_done:
return de;
}
libc_hidden_def(__READDIR)
-#if defined __UCLIBC_HAS_LFS__ && __WORDSIZE == 64
+#if __WORDSIZE == 64
strong_alias_untyped(readdir,readdir64)
libc_hidden_def(readdir64)
#endif
diff --git a/libc/misc/dirent/readdir_r.c b/libc/misc/dirent/readdir_r.c
index 5beebfed0..04feac9c6 100644
--- a/libc/misc/dirent/readdir_r.c
+++ b/libc/misc/dirent/readdir_r.c
@@ -67,7 +67,7 @@ all_done:
return((de != NULL)? 0 : ret);
}
libc_hidden_def(__READDIR_R)
-#if defined __UCLIBC_HAS_LFS__ && __WORDSIZE == 64
+#if __WORDSIZE == 64
strong_alias_untyped(readdir_r,readdir64_r)
libc_hidden_def(readdir64_r)
#endif
diff --git a/libc/misc/dirent/scandir.c b/libc/misc/dirent/scandir.c
index c036ce59b..1f6c1ec9c 100644
--- a/libc/misc/dirent/scandir.c
+++ b/libc/misc/dirent/scandir.c
@@ -97,6 +97,6 @@ int __SCANDIR(const char *dir, __DIRENT_TYPE ***namelist,
*namelist = names;
return pos;
}
-#if defined __UCLIBC_HAS_LFS__ && __WORDSIZE == 64
+#if __WORDSIZE == 64
strong_alias_untyped(scandir,scandir64)
#endif
diff --git a/libc/misc/dirent/versionsort.c b/libc/misc/dirent/versionsort.c
index 8e56ec56b..8129f7886 100644
--- a/libc/misc/dirent/versionsort.c
+++ b/libc/misc/dirent/versionsort.c
@@ -12,6 +12,6 @@ int versionsort(const struct dirent **a, const struct dirent **b)
{
return strverscmp((*a)->d_name, (*b)->d_name);
}
-#if defined __UCLIBC_HAS_LFS__ && __WORDSIZE == 64
+#if __WORDSIZE == 64
strong_alias_untyped(versionsort,versionsort64)
#endif
diff --git a/libc/misc/file/Makefile.in b/libc/misc/file/Makefile.in
index b94efa67f..a19ac5790 100644
--- a/libc/misc/file/Makefile.in
+++ b/libc/misc/file/Makefile.in
@@ -13,12 +13,12 @@ MISC_FILE_OUT := $(top_builddir)libc/misc/file
CSRC-y := $(wildcard $(MISC_FILE_DIR)/*.c)
CSRC_LFS := $(wildcard $(MISC_FILE_DIR)/*64.c)
CSRC-y := $(filter-out $(CSRC_LFS),$(CSRC-y))
-CSRC-$(UCLIBC_HAS_LFS) += $(CSRC_LFS)
+CSRC-y += $(CSRC_LFS)
MISC_FILE_OBJ := $(patsubst $(MISC_FILE_DIR)/%.c,$(MISC_FILE_OUT)/%.o,$(CSRC-y))
libc-y += $(MISC_FILE_OBJ)
-libc-nomulti-$(UCLIBC_HAS_LFS) += $(MISC_FILE_OUT)/lockf64.o
+libc-nomulti-y += $(MISC_FILE_OUT)/lockf64.o
objclean-y += CLEAN_libc/misc/file
diff --git a/libc/misc/file/isfdtype.c b/libc/misc/file/isfdtype.c
index 4d9199bd1..27fb01ca7 100644
--- a/libc/misc/file/isfdtype.c
+++ b/libc/misc/file/isfdtype.c
@@ -20,12 +20,7 @@
#include <sys/stat.h>
#include <sys/socket.h>
#include <sys/types.h>
-#ifdef __UCLIBC_HAS_LFS__
-# include <_lfs_64.h>
-#else
-# define stat64 stat
-# define fstat64 fstat
-#endif
+#include <_lfs_64.h>
int
isfdtype (int fildes, int fdtype)
diff --git a/libc/misc/fts/fts.c b/libc/misc/fts/fts.c
index 7dc67683b..d5ebcbc5e 100644
--- a/libc/misc/fts/fts.c
+++ b/libc/misc/fts/fts.c
@@ -36,14 +36,7 @@
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
-
-#ifdef __UCLIBC_HAS_LFS__
-/* this is wrong, either you include this header as first, or not at all */
-# include <_lfs_64.h>
-#else
-# define stat64 stat
-# define fstat64 fstat
-#endif
+#include <_lfs_64.h>
/* Largest alignment size needed, minus one.
Usually long double is the worst case. */
diff --git a/libc/misc/ftw/Makefile.in b/libc/misc/ftw/Makefile.in
index 084a73009..939932b09 100644
--- a/libc/misc/ftw/Makefile.in
+++ b/libc/misc/ftw/Makefile.in
@@ -7,8 +7,7 @@
subdirs += libc/misc/ftw
-CSRC-y := ftw.c
-CSRC-$(UCLIBC_HAS_LFS) += ftw64.c
+CSRC-y := ftw.c ftw64.c
MISC_FTW_DIR := $(top_srcdir)libc/misc/ftw
MISC_FTW_OUT := $(top_builddir)libc/misc/ftw
diff --git a/libc/misc/ftw/ftw.c b/libc/misc/ftw/ftw.c
index c6241ed90..0c6e617da 100644
--- a/libc/misc/ftw/ftw.c
+++ b/libc/misc/ftw/ftw.c
@@ -111,11 +111,7 @@ extern char *xgetcwd (void);
# undef __opendir
# define __opendir opendir
# undef __readdir64
-# ifndef __UCLIBC_HAS_LFS__
-# define __readdir64 readdir
-# else
# define __readdir64 readdir64
-# endif
# undef __stpcpy
# define __stpcpy stpcpy
# undef __tdestroy
@@ -126,10 +122,6 @@ extern char *xgetcwd (void);
# define __tsearch tsearch
# undef internal_function
# define internal_function /* empty */
-# ifndef __UCLIBC_HAS_LFS__
-# undef dirent64
-# define dirent64 dirent
-# endif
# undef MAX
# define MAX(a, b) ((a) > (b) ? (a) : (b))
#endif
diff --git a/libc/misc/glob/Makefile.in b/libc/misc/glob/Makefile.in
index c89d2b08d..a3f952067 100644
--- a/libc/misc/glob/Makefile.in
+++ b/libc/misc/glob/Makefile.in
@@ -9,7 +9,7 @@ subdirs += libc/misc/glob
VARIANT := $(if $(UCLIBC_HAS_GNU_GLOB),,-susv3)
CSRC-y := glob$(VARIANT).c
-CSRC-$(UCLIBC_HAS_LFS) += glob64$(VARIANT).c
+CSRC-y += glob64$(VARIANT).c
MISC_GLOB_DIR := $(top_srcdir)libc/misc/glob
MISC_GLOB_OUT := $(top_builddir)libc/misc/glob
diff --git a/libc/misc/glob/glob-susv3.c b/libc/misc/glob/glob-susv3.c
index 59b4d8e5f..bdece2a91 100644
--- a/libc/misc/glob/glob-susv3.c
+++ b/libc/misc/glob/glob-susv3.c
@@ -6,9 +6,7 @@
#include <features.h>
-#ifdef __UCLIBC_HAS_LFS__
-# define BUILD_GLOB64
-#endif
+#define BUILD_GLOB64
#include <glob.h>
#include <fnmatch.h>
@@ -39,14 +37,10 @@ extern int __glob_sort(const void *a, const void *b) attribute_hidden;
extern int __glob_match_in_dir(const char *d, const char *p, int flags, int (*errfunc)(const char *path, int err), struct match **tail) attribute_hidden;
#endif
-#ifdef __UCLIBC_HAS_LFS__
# define stat stat64
# define readdir_r readdir64_r
# define dirent dirent64
# define struct_stat struct stat64
-#else
-# define struct_stat struct stat
-#endif
/* keep only one copy of these */
#ifndef __GLOB64
diff --git a/libc/misc/glob/glob.c b/libc/misc/glob/glob.c
index 923c03538..c4ecf678b 100644
--- a/libc/misc/glob/glob.c
+++ b/libc/misc/glob/glob.c
@@ -49,11 +49,7 @@
#define globfree(pglob) globfree64 (pglob)
#else
#define __readdir readdir
-#ifdef __UCLIBC_HAS_LFS__
#define __readdir64 readdir64
-#else
-#define __readdir64 readdir
-#endif
#define struct_stat64 struct stat
#define __stat64(fname, buf) stat (fname, buf)
#endif
@@ -341,7 +337,7 @@ static int glob_in_dir (const char *pattern, const char *directory, int flags,
{
const char *name;
size_t len;
-#if defined __UCLIBC_HAS_LFS__ && !defined COMPILE_GLOB64
+#if !defined COMPILE_GLOB64
struct dirent64 *d;
union
{
diff --git a/libc/misc/internals/tempname.c b/libc/misc/internals/tempname.c
index 7654eb433..ca87b0c06 100644
--- a/libc/misc/internals/tempname.c
+++ b/libc/misc/internals/tempname.c
@@ -223,11 +223,9 @@ int attribute_hidden __gen_tempname (char *tmpl, int kind, int flags,
case __GT_FILE:
fd = open (tmpl, O_RDWR | O_CREAT | O_EXCL | flags, mode);
break;
-#if defined __UCLIBC_HAS_LFS__
case __GT_BIGFILE:
fd = open64 (tmpl, O_RDWR | O_CREAT | O_EXCL | flags, mode);
break;
-#endif
case __GT_DIR:
fd = mkdir (tmpl, mode);
break;
diff --git a/libc/misc/statfs/Makefile.in b/libc/misc/statfs/Makefile.in
index d70ab8f6e..322bc9071 100644
--- a/libc/misc/statfs/Makefile.in
+++ b/libc/misc/statfs/Makefile.in
@@ -8,9 +8,8 @@
subdirs += libc/misc/statfs
CSRC-y := statvfs.c fstatvfs.c
-CSRC-$(UCLIBC_HAS_LFS) += $(patsubst %.c,%64.c,$(CSRC-y))
-CSRC-$(if $(findstring yy,$(UCLIBC_HAS_LFS)$(UCLIBC_LINUX_SPECIFIC)),y) += \
- fstatfs64.c statfs64.c
+CSRC-y += $(patsubst %.c,%64.c,$(CSRC-y))
+CSRC-$(UCLIBC_LINUX_SPECIFIC) += fstatfs64.c statfs64.c
MISC_STATFS_DIR := $(top_srcdir)libc/misc/statfs
MISC_STATFS_OUT := $(top_builddir)libc/misc/statfs
@@ -20,7 +19,7 @@ MISC_STATFS_OBJ := $(patsubst %.c,$(MISC_STATFS_OUT)/%.o,$(CSRC-y))
libc-y += $(MISC_STATFS_OBJ)
-libc-nomulti-$(UCLIBC_HAS_LFS) += $(MISC_STATFS_OUT)/statvfs64.o $(MISC_STATFS_OUT)/fstatvfs64.o
+libc-nomulti-y += $(MISC_STATFS_OUT)/statvfs64.o $(MISC_STATFS_OUT)/fstatvfs64.o
objclean-y += CLEAN_libc/misc/statfs
diff --git a/libc/misc/sysvipc/ftok.c b/libc/misc/sysvipc/ftok.c
index 1e7549984..c8d5e58b4 100644
--- a/libc/misc/sysvipc/ftok.c
+++ b/libc/misc/sysvipc/ftok.c
@@ -18,11 +18,7 @@
#include <sys/ipc.h>
#include <sys/stat.h>
-#ifdef __UCLIBC_HAS_LFS__
-# include <_lfs_64.h>
-#else
-# define stat64 stat
-#endif
+#include <_lfs_64.h>
key_t ftok (const char *pathname, int proj_id)
{