public inbox for libc-hacker@sourceware.org
 help / color / mirror / Atom feed
* mmap with __USE_FILE_OFFSET64
@ 1999-11-15  8:36 Andreas Jaeger
  0 siblings, 0 replies; only message in thread
From: Andreas Jaeger @ 1999-11-15  8:36 UTC (permalink / raw)
  To: GNU libc hacker

Looking at the usage of __USE_FILE_OFFSET64, I noticed a problem with
the mmap system call.

We should use __off64_t instead of just off_t and also use __REDIRECT
--- as we do in all other usages of __USE_FILE_OFFSET64.

I'm appending a patch for inclusion in glibc 2.2 and 2.1.3.

Andreas

1999-11-15  Andreas Jaeger  <aj@suse.de>

	* misc/sys/mman.h: Use __REDIRECT for mmap, correct prototype to
	use __off64_t.


============================================================
Index: misc/sys/mman.h
--- misc/sys/mman.h	1999/10/09 21:21:58	1.3
+++ misc/sys/mman.h	1999/11/15 16:23:45
@@ -44,9 +44,14 @@
 extern void *mmap (void *__addr, size_t __len, int __prot,
 		   int __flags, int __fd, __off_t __offset) __THROW;
 #else
-extern void *mmap (void *__addr, size_t __len, int __prot,
-		   int __flags, int __fd, __off_t __offset) __THROW
-     __asm__ ("mmap64");
+# ifdef __REDIRECT
+extern void * __REDIRECT (mmap,
+			  (void *__addr, size_t __len, int __prot,
+			   int __flags, int __fd, __off64_t __offset) __THROW,
+			  mmap64);
+# else
+#  define mmap mmap64
+# endif
 #endif
 #ifdef __USE_LARGEFILE64
 extern void *mmap64 (void *__addr, size_t __len, int __prot,

-- 
 Andreas Jaeger   
  SuSE Labs aj@suse.de	
   private aj@arthur.rhein-neckar.de

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~1999-11-15  8:36 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-11-15  8:36 mmap with __USE_FILE_OFFSET64 Andreas Jaeger

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 read-only IMAP folder(s) and NNTP newsgroup(s).