Unused mmap library comes as deprecation warning on compile

Ali Çehreli acehreli at yahoo.com
Mon Feb 24 14:22:21 PST 2014


On 02/24/2014 12:20 PM, Tolga Cakiroglu wrote:

 > I have about 12 different separate programmes. While compiling only one
 > of them, it gives as warning as below:
 >
 > /usr/include/dmd/phobos/std/mmfile.d(344): Deprecation: alias
 > core.sys.posix.sys.mman.MAP_ANON is deprecated - Please use
 > core.sys.linux.sys.mman for non-POSIX extensions

It is a compilation message generated by 
druntime/src/core/sys/posix/sys/mman.d:

     static import core.sys.linux.sys.mman;
     deprecated("Please use core.sys.linux.sys.mman for non-POSIX 
extensions")
     alias MAP_ANON = core.sys.linux.sys.mman.MAP_ANON;

So, phobos/std/mmfile.d imports a module that has been deprecated by 
druntime:

private import core.sys.posix.sys.mman;

Create a bug report or pull request ;) so that it imports the correct mman.

Ali



More information about the Digitalmars-d-learn mailing list