lzip-bug
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Lzip-bug] S_ISVTX is undefined without _XOPEN_SOURCE


From: Antonio Diaz Diaz
Subject: Re: [Lzip-bug] S_ISVTX is undefined without _XOPEN_SOURCE
Date: Wed, 27 Dec 2017 18:28:15 +0100
User-agent: Mozilla/5.0 (X11; U; Linux i586; en-US; rv:1.9.1.19) Gecko/20110420 SeaMonkey/2.0.14

Hello,

Charlie Lin wrote:
The patch adds _XOPEN_SOURCE=500
Explaination: on glibc, S_ISVTX is only visible if the aformentioned
macro is defined.

Compiler: gcc 7.2.1
CFLAGS=-Wall -Wextra -Werror -Wpedantic -fno-builtin -std=c99

This is true, but I expect that any user requesting a particular version of the standard (in this case C99) would also specify the XOPEN level (as in -D_XOPEN_SOURCE=500). At least this is how I test clzip.

I would prefer to not define _XOPEN_SOURCE in the source to prevent interferences with other compiler options. For example, a conflict may happen[1] if I apply the patch and the user specifies '-D_POSIX_C_SOURCE=200809L'.

[1] http://pubs.opengroup.org/onlinepubs/007904975/functions/xsh_chap02_02.html "Therefore, if _XOPEN_SOURCE is set equal to 600 and _POSIX_C_SOURCE is set equal to 200112L, the behavior is the same as if only _XOPEN_SOURCE is defined and set equal to 600. However, should _POSIX_C_SOURCE be set to a value greater than 200112L, the behavior is unspecified."


Best regards,
Antonio.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]