Giter Site home page Giter Site logo

MAP_ANON and MAP_ANONYMOUS about portable HOT 7 CLOSED

libressl avatar libressl commented on July 22, 2024
MAP_ANON and MAP_ANONYMOUS

from portable.

Comments (7)

kinichiro avatar kinichiro commented on July 22, 2024 1

I checked mmap man page of several platforms on the WWW.
And I listed that MAP_ANON and MAP_ANONYMOUS are supported or not.

                 MAP_ANON  MAP_ANONYMOUS
    OpenBSD         Y         Y(*)
    Linux           Y(*)      Y
    FreeBSD         Y         Y
    NetBSD          Y         N
    OSX             Y         N
    Solaris         Y         N
    HP-UX           N         Y
    AIX             N         Y
    IRIX            N         N
    (*) synonym to other

Simply replacing MAP_ANON with MAP_ANONYMOUS will cause another issue, sorry.

Instead of replacing, how about adding define, like this.

    #ifndef MAP_ANONYMOUS
    #define MAP_ANONYMOUS MAP_ANON
    #endif

Thanks.

from portable.

bob-beck avatar bob-beck commented on July 22, 2024

What platform is this an issue on?

from portable.

kinichiro avatar kinichiro commented on July 22, 2024

Hi,
HP-UX 11.31 itanium without gcc.
I checked header files, too.

from portable.

busterb avatar busterb commented on July 22, 2024

We added a compat definition in af705b3

from portable.

kinichiro avatar kinichiro commented on July 22, 2024

Sorry,
If LibreSSL keeps using MAP_ANON, this include/sys/mman.h fix should be like this.

#ifndef MAP_ANON
#ifdef MAP_ANONYMOUS
#define MAP_ANON MAP_ANONYMOUS
#else
#error "System does not support mapping anonymous pages?"
#endif
#endif

My recommendation was wrong.
This fix should be for the platform that does NOT define MAP_ANON but MAP_ANONYMOUS.
Sorry, again.

from portable.

busterb avatar busterb commented on July 22, 2024

I see. Thanks for the note, this is now fixed.

from portable.

kinichiro avatar kinichiro commented on July 22, 2024

Thanks for everything, busterb.
I confirmed this is fixed.

from portable.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.