This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [libstdc++-v3] Add configure check for S_ISSOCK


On 11/07/2017 08:28 PM, Jonathan Wakely wrote:
On 07/11/17 19:26 +0200, Andris Pavenis wrote:
src/filesystem/ops-common.c uses S_ISSOCK unconditionally without checking that it is available

As result compile fails for DJGPP when S_ISREG is available but S_ISSOCK is not. Included patch add configure check for S_ISSOCK

Andris

ChangeLog entry:

2017-11-07  Andris Pavenis<andris.pavenis.iki.fi>

    * acinclude.m4 (GLIBCXX_CHECK_S_ISSOCK): Define
    * configure.ac: Check presence of S_ISSOCK
    * src/filesystem/ops-common.h: Only use S_ISSOCK if defined for target
    * config.h.in: Regenerate
    * configure: Regenerate

Do we need an autoconf check?


I just followed the same style as with S_ISREG/S_IFREG...

Simple #ifdef S_ISSOCK is sufficient in this case.

Andris


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]