Project

General

Profile

Actions

Bug #2404

open

mmap.s inconsistency

Added by Igor Pashev over 9 years ago. Updated over 9 years ago.

Status:
Feedback
Priority:
Normal
Assignee:
-
Category:
-
Start date:
2012-03-13
Due date:
% Done:

0%

Estimated time:
Difficulty:
Medium
Tags:
needs-triage
Gerrit CR:

Description

usr/src/lib/libc/common/sys/mmap.s

Snippet in question (mmap.s):

#if !defined(_LARGEFILE_SOURCE)
    ANSI_PRAGMA_WEAK(mmap,function)
#else
    ANSI_PRAGMA_WEAK(mmap64,function)
#endif

#include "SYS.h" 
#include <sys/mman.h>        /* Need _MAP_NEW definition     */

#if !defined(_LARGEFILE_SOURCE)

Those two checks for _LARGEFILE_SOURCE mayby inconsistent, because
sys/mman.h includes sys/feature_tests.h and _LARGEFILE_SOURCE can be redefined there (sys/feature_tests.h):

#if    (!defined(_STRICT_STDC) && !defined(__XOPEN_OR_POSIX)) || \
        defined(_KERNEL) || defined(_KMEMUSER) || \
        defined(__EXTENSIONS__)
#undef    _LARGEFILE64_SOURCE
#define    _LARGEFILE64_SOURCE    1
#endif
#if    _LARGEFILE64_SOURCE - 0 == 1
#undef    _LARGEFILE_SOURCE
#define    _LARGEFILE_SOURCE    1
#endif

Actions

Also available in: Atom PDF