• Pierre Moreau's avatar
    math: Import isinf and others to global namespace · 649704f1
    Pierre Moreau authored
    Starting from C++11, several math functions, like isinf, moved into the std
    namespace. Since cmath undefines those functions before redefining them inside
    the namespace, and glibc 2.23 defines the C variants as macros, the C variants
    in global namespace are not accessible any longer.
    
    v2: Move the fix outside of Nouveau, as suggested by Jose Fonseca, since anyone
        might need it when GCC switches to C++14 by default with GCC 6.0.
    
    v3:
    *   Put the code directly inside c99_math.h rather than creating a new header
        file, as asked by Jose Fonseca;
    *   Guard the code behind glibc version checks, as only glibc > =2.23 defines
        isinf & co. as functions, as suggested by Jose Fonseca.
    Signed-off-by: 's avatarPierre Moreau <pierre.morrow@free.fr>
    Signed-off-by: 's avatarJose Fonseca <jfonseca@vmware.com>
    649704f1
c99_math.h 5.24 KB