public inbox for libc-hacker@sourceware.org
 help / color / mirror / Atom feed
From: Andreas Jaeger <aj@suse.de>
To: GNU libc hacker <libc-hacker@sourceware.cygnus.com>
Subject: mmap with __USE_FILE_OFFSET64
Date: Mon, 15 Nov 1999 08:36:00 -0000	[thread overview]
Message-ID: <u8yabzhgbe.fsf@gromit.rhein-neckar.de> (raw)

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

                 reply	other threads:[~1999-11-15  8:36 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=u8yabzhgbe.fsf@gromit.rhein-neckar.de \
    --to=aj@suse.de \
    --cc=libc-hacker@sourceware.cygnus.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).