[Patches] Almost insignificant patch for mmapmodule
Lorenzo M. Catucci
lorenzo@sancho.ccd.uniroma2.it
Sat, 17 Jun 2000 16:29:14 +0200 (CEST)
While compiling mmapfile for 1.5.2, I happened to go looking the sources,
and find the stub for the case when mremap is unusable. After looking
around and convincing myself under linux mremap should be available to the
user, I discovered the symbol is only defined when _GNU_SOURCE is defined;
therefore, here is the change: if we are compiling for linux, define
_GNU_SOURCE before including mman.h, and all is done. It seems the
disclaimer is a bit too much for a one liner, but it's here appended to
the patch.
Yours,
lorenzo
*** Python-1.6a2.orig/Modules/mmapmodule.c=09Thu Jun 15 15:50:46 2000
--- Python-1.6a2/Modules/mmapmodule.c=09Thu Jun 15 15:53:45 2000
***************
*** 27,32 ****
--- 27,35 ----
#endif
=20
#ifdef UNIX
+ #ifdef __linux__
+ #define _GNU_SOURCE /* So we can get MREMAP_MAYMOVE defined */
+ #endif
#include <unistd.h>
#include <sys/mman.h>
#endif
And now the Contribution disclaimer...=20
I confirm that, to the best of my knowledge and belief, this
contribution is free of any claims of third parties under
copyright, patent or other rights or interests ("claims"). To
the extent that I have any such claims, I hereby grant to CNRI a
nonexclusive, irrevocable, royalty-free, worldwide license to
reproduce, distribute, perform and/or display publicly, prepare
derivative versions, and otherwise use this contribution as part
of the Python software and its related documentation, or any
derivative versions thereof, at no cost to CNRI or its licensed
users, and to authorize others to do so.
I acknowledge that CNRI may, at its sole discretion, decide
whether or not to incorporate this contribution in the Python
software and its related documentation. I further grant CNRI
permission to use my name and other identifying information
provided to CNRI by me for use in connection with the Python
software and its related documentation.
+-------------------------+----------------------------------------------+
| Lorenzo M. Catucci | Centro di Calcolo e Documentazione |
| catucci@ccd.uniroma2.it | Universit=E0 degli Studi di Roma "Tor Vergata" =
|
| | Via O. Raimondo 18 ** I-00173 ROMA ** ITALY |
| Tel. +39 06 7259 2255 | Fax. +39 06 7259 2125 |
+-------------------------+----------------------------------------------+