mailing list of musl libc
 help / color / mirror / code / Atom feed
* lfs *64 fixes
@ 2014-09-04 20:51 Szabolcs Nagy
  2014-09-04 21:04 ` Szabolcs Nagy
  0 siblings, 1 reply; 2+ messages in thread
From: Szabolcs Nagy @ 2014-09-04 20:51 UTC (permalink / raw)
  To: musl

[-- Attachment #1: Type: text/plain, Size: 17 bytes --]

patches attached

[-- Attachment #2: 0001-add-missing-legacy-LFS-64-symbol-aliases.patch --]
[-- Type: text/x-diff, Size: 3627 bytes --]

From b9047ae239b359a3dc368ac17551b01f027f0ccb Mon Sep 17 00:00:00 2001
From: Szabolcs Nagy <nsz@port70.net>
Date: Thu, 4 Sep 2014 22:01:36 +0200
Subject: [PATCH 1/2] add missing legacy LFS *64 symbol aliases

versionsort64, aio*64 and lio*64 symbols were missing, they are
only needed for glibc ABI compatibility, on the source level
dirent.h and aio.h already redirect them.
---
 src/aio/aio_cancel.c     |    3 +++
 src/aio/aio_error.c      |    3 +++
 src/aio/aio_fsync.c      |    3 +++
 src/aio/aio_readwrite.c  |    3 +++
 src/aio/aio_return.c     |    3 +++
 src/aio/aio_suspend.c    |    3 +++
 src/aio/lio_listio.c     |    1 +
 src/dirent/versionsort.c |    4 ++++
 8 files changed, 23 insertions(+)

diff --git a/src/aio/aio_cancel.c b/src/aio/aio_cancel.c
index 5a753b1..16fc431 100644
--- a/src/aio/aio_cancel.c
+++ b/src/aio/aio_cancel.c
@@ -1,6 +1,7 @@
 #include <aio.h>
 #include <pthread.h>
 #include <errno.h>
+#include "libc.h"
 
 int aio_cancel(int fd, struct aiocb *cb)
 {
@@ -14,3 +15,5 @@ int aio_cancel(int fd, struct aiocb *cb)
 	}
 	return cb->__err==EINPROGRESS ? AIO_NOTCANCELED : AIO_ALLDONE;
 }
+
+LFS64(aio_cancel);
diff --git a/src/aio/aio_error.c b/src/aio/aio_error.c
index a780fd3..fd42ea1 100644
--- a/src/aio/aio_error.c
+++ b/src/aio/aio_error.c
@@ -1,6 +1,9 @@
 #include <aio.h>
+#include "libc.h"
 
 int aio_error(const struct aiocb *cb)
 {
 	return cb->__err;
 }
+
+LFS64(aio_error);
diff --git a/src/aio/aio_fsync.c b/src/aio/aio_fsync.c
index 0ac6ea8..6e1a70a 100644
--- a/src/aio/aio_fsync.c
+++ b/src/aio/aio_fsync.c
@@ -1,5 +1,6 @@
 #include <aio.h>
 #include <errno.h>
+#include "libc.h"
 
 int aio_fsync(int op, struct aiocb *cb)
 {
@@ -7,3 +8,5 @@ int aio_fsync(int op, struct aiocb *cb)
 	errno = EINVAL;
 	return -1;
 }
+
+LFS64(aio_fsync);
diff --git a/src/aio/aio_readwrite.c b/src/aio/aio_readwrite.c
index 2278226..8753ffd 100644
--- a/src/aio/aio_readwrite.c
+++ b/src/aio/aio_readwrite.c
@@ -105,3 +105,6 @@ int aio_write(struct aiocb *cb)
 	cb->aio_lio_opcode = LIO_WRITE;
 	return new_req(cb);
 }
+
+LFS64(aio_read);
+LFS64(aio_write);
diff --git a/src/aio/aio_return.c b/src/aio/aio_return.c
index df10bdb..c1ce450 100644
--- a/src/aio/aio_return.c
+++ b/src/aio/aio_return.c
@@ -1,6 +1,9 @@
 #include <aio.h>
+#include "libc.h"
 
 ssize_t aio_return(struct aiocb *cb)
 {
 	return cb->__ret;
 }
+
+LFS64(aio_return);
diff --git a/src/aio/aio_suspend.c b/src/aio/aio_suspend.c
index 39a1d3a..dcdf601 100644
--- a/src/aio/aio_suspend.c
+++ b/src/aio/aio_suspend.c
@@ -1,6 +1,7 @@
 #include <aio.h>
 #include <errno.h>
 #include "pthread_impl.h"
+#include "libc.h"
 
 /* Due to the requirement that aio_suspend be async-signal-safe, we cannot
  * use any locks, wait queues, etc. that would make it more efficient. The
@@ -55,3 +56,5 @@ int aio_suspend(const struct aiocb *const cbs[], int cnt, const struct timespec
 		}
 	}
 }
+
+LFS64(aio_suspend);
diff --git a/src/aio/lio_listio.c b/src/aio/lio_listio.c
index 75ed225..bd37767 100644
--- a/src/aio/lio_listio.c
+++ b/src/aio/lio_listio.c
@@ -141,3 +141,4 @@ int lio_listio(int mode, struct aiocb *restrict const *restrict cbs, int cnt, st
 	return 0;
 }
 
+LFS64(lio_listio);
diff --git a/src/dirent/versionsort.c b/src/dirent/versionsort.c
index 9769610..410cb70 100644
--- a/src/dirent/versionsort.c
+++ b/src/dirent/versionsort.c
@@ -1,8 +1,12 @@
 #define _GNU_SOURCE
 #include <string.h>
 #include <dirent.h>
+#include "libc.h"
 
 int versionsort(const struct dirent **a, const struct dirent **b)
 {
 	return strverscmp((*a)->d_name, (*b)->d_name);
 }
+
+#undef versionsort64
+LFS64(versionsort);
-- 
1.7.10.4


[-- Attachment #3: 0002-fix-the-macros-for-LFS-64_t-types-in-sys-stat.h.patch --]
[-- Type: text/x-diff, Size: 856 bytes --]

From db94dfb2155f4d83d42c69250e886d05f9194faa Mon Sep 17 00:00:00 2001
From: Szabolcs Nagy <nsz@port70.net>
Date: Thu, 4 Sep 2014 22:14:24 +0200
Subject: [PATCH 2/2] fix the macros for LFS *64_t types in sys/stat.h

there is no blksize64_t (blksize_t is always long) but there are
fsblkcnt64_t and fsfilcnt64_t types.
---
 include/sys/stat.h |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/include/sys/stat.h b/include/sys/stat.h
index c6abab5..82a6490 100644
--- a/include/sys/stat.h
+++ b/include/sys/stat.h
@@ -100,8 +100,9 @@ int lchmod(const char *, mode_t);
 #define fstat64 fstat
 #define lstat64 lstat
 #define fstatat64 fstatat
-#define blksize64_t blksize_t
 #define blkcnt64_t blkcnt_t
+#define fsblkcnt64_t fsblkcnt_t
+#define fsfilcnt64_t fsfilcnt_t
 #define ino64_t ino_t
 #define off64_t off_t
 #endif
-- 
1.7.10.4


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: lfs *64 fixes
  2014-09-04 20:51 lfs *64 fixes Szabolcs Nagy
@ 2014-09-04 21:04 ` Szabolcs Nagy
  0 siblings, 0 replies; 2+ messages in thread
From: Szabolcs Nagy @ 2014-09-04 21:04 UTC (permalink / raw)
  To: musl

[-- Attachment #1: Type: text/plain, Size: 157 bytes --]

* Szabolcs Nagy <nsz@port70.net> [2014-09-04 22:51:07 +0200]:
> Subject: [PATCH 2/2] fix the macros for LFS *64_t types in sys/stat.h
> 

missed sys/types.h

[-- Attachment #2: 0001-fix-macros-for-LFS-64_t-types-in-sys-stat.h-and-sys-.patch --]
[-- Type: text/x-diff, Size: 1283 bytes --]

From 9dcf5d838393a0100125af4aa0f2c2d0a91c61c5 Mon Sep 17 00:00:00 2001
From: Szabolcs Nagy <nsz@port70.net>
Date: Thu, 4 Sep 2014 22:14:24 +0200
Subject: [PATCH] fix macros for LFS *64_t types in sys/stat.h and sys/types.h

there is no blksize64_t (blksize_t is always long) but there are
fsblkcnt64_t and fsfilcnt64_t types.
---
 include/sys/stat.h  |    3 ++-
 include/sys/types.h |    1 -
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/sys/stat.h b/include/sys/stat.h
index c6abab5..82a6490 100644
--- a/include/sys/stat.h
+++ b/include/sys/stat.h
@@ -100,8 +100,9 @@ int lchmod(const char *, mode_t);
 #define fstat64 fstat
 #define lstat64 lstat
 #define fstatat64 fstatat
-#define blksize64_t blksize_t
 #define blkcnt64_t blkcnt_t
+#define fsblkcnt64_t fsblkcnt_t
+#define fsfilcnt64_t fsfilcnt_t
 #define ino64_t ino_t
 #define off64_t off_t
 #endif
diff --git a/include/sys/types.h b/include/sys/types.h
index f00db03..75e489c 100644
--- a/include/sys/types.h
+++ b/include/sys/types.h
@@ -73,7 +73,6 @@ typedef unsigned long long u_quad_t;
 #endif
 
 #if defined(_LARGEFILE64_SOURCE) || defined(_GNU_SOURCE)
-#define blksize64_t blksize_t
 #define blkcnt64_t blkcnt_t
 #define fsblkcnt64_t fsblkcnt_t
 #define fsfilcnt64_t fsfilcnt_t
-- 
1.7.10.4


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-09-04 21:04 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-09-04 20:51 lfs *64 fixes Szabolcs Nagy
2014-09-04 21:04 ` Szabolcs Nagy

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).