summaryrefslogtreecommitdiff
path: root/src/dirent
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2018-09-12 00:28:34 -0400
committerRich Felker <dalias@aerifal.cx>2018-09-12 14:34:38 -0400
commit63a4c9adf227a6f6a5f7f70f6dc3f8863f846927 (patch)
tree7897385e0678791801bf27710dad3cce93bc6165 /src/dirent
parent5ce3737931bb411a8d167356d4d0287b53b0cbdc (diff)
downloadmusl-63a4c9adf227a6f6a5f7f70f6dc3f8863f846927.tar.gz
musl-63a4c9adf227a6f6a5f7f70f6dc3f8863f846927.tar.bz2
musl-63a4c9adf227a6f6a5f7f70f6dc3f8863f846927.tar.xz
musl-63a4c9adf227a6f6a5f7f70f6dc3f8863f846927.zip
remove spurious inclusion of libc.h for LFS64 ABI aliases
the LFS64 macro was not self-documenting and barely saved any characters. simply use weak_alias directly so that it's clear what's being done, and doesn't depend on a header to provide a strange macro.
Diffstat (limited to 'src/dirent')
-rw-r--r--src/dirent/alphasort.c3
-rw-r--r--src/dirent/readdir.c3
-rw-r--r--src/dirent/readdir_r.c2
-rw-r--r--src/dirent/scandir.c3
-rw-r--r--src/dirent/versionsort.c3
5 files changed, 5 insertions, 9 deletions
diff --git a/src/dirent/alphasort.c b/src/dirent/alphasort.c
index 42050fb7..bee672eb 100644
--- a/src/dirent/alphasort.c
+++ b/src/dirent/alphasort.c
@@ -1,10 +1,9 @@
#include <string.h>
#include <dirent.h>
-#include "libc.h"
int alphasort(const struct dirent **a, const struct dirent **b)
{
return strcoll((*a)->d_name, (*b)->d_name);
}
-LFS64(alphasort);
+weak_alias(alphasort, alphasort64);
diff --git a/src/dirent/readdir.c b/src/dirent/readdir.c
index eef92f79..569fc705 100644
--- a/src/dirent/readdir.c
+++ b/src/dirent/readdir.c
@@ -3,7 +3,6 @@
#include <stddef.h>
#include "__dirent.h"
#include "syscall.h"
-#include "libc.h"
typedef char dirstream_buf_alignment_check[1-2*(int)(
offsetof(struct __dirstream, buf) % sizeof(off_t))];
@@ -27,4 +26,4 @@ struct dirent *readdir(DIR *dir)
return de;
}
-LFS64(readdir);
+weak_alias(readdir, readdir64);
diff --git a/src/dirent/readdir_r.c b/src/dirent/readdir_r.c
index daa6c6ed..6293a514 100644
--- a/src/dirent/readdir_r.c
+++ b/src/dirent/readdir_r.c
@@ -26,4 +26,4 @@ int readdir_r(DIR *restrict dir, struct dirent *restrict buf, struct dirent **re
return 0;
}
-LFS64_2(readdir_r, readdir64_r);
+weak_alias(readdir_r, readdir64_r);
diff --git a/src/dirent/scandir.c b/src/dirent/scandir.c
index 3af2b50f..7ee195dd 100644
--- a/src/dirent/scandir.c
+++ b/src/dirent/scandir.c
@@ -4,7 +4,6 @@
#include <stdint.h>
#include <errno.h>
#include <stddef.h>
-#include "libc.h"
int scandir(const char *path, struct dirent ***res,
int (*sel)(const struct dirent *),
@@ -45,4 +44,4 @@ int scandir(const char *path, struct dirent ***res,
return cnt;
}
-LFS64(scandir);
+weak_alias(scandir, scandir64);
diff --git a/src/dirent/versionsort.c b/src/dirent/versionsort.c
index 410cb703..d4c48923 100644
--- a/src/dirent/versionsort.c
+++ b/src/dirent/versionsort.c
@@ -1,7 +1,6 @@
#define _GNU_SOURCE
#include <string.h>
#include <dirent.h>
-#include "libc.h"
int versionsort(const struct dirent **a, const struct dirent **b)
{
@@ -9,4 +8,4 @@ int versionsort(const struct dirent **a, const struct dirent **b)
}
#undef versionsort64
-LFS64(versionsort);
+weak_alias(versionsort, versionsort64);