https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119217

--- Comment #30 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-15 branch has been updated by Robert Dubner
<rdub...@gcc.gnu.org>:

https://gcc.gnu.org/g:320f24a3b26aa8dc0640aa56b63bc9ef30ca043b

commit r15-10116-g320f24a3b26aa8dc0640aa56b63bc9ef30ca043b
Author: Rainer Orth <r...@cebitec.uni-bielefeld.de>
Date:   Thu May 8 09:21:45 2025 +0200

    cobol: Don't require GLOB_BRACE etc. [PR119217]

    cdf-copy.cc doesn't compile on Solaris:

    /vol/gcc/src/hg/master/local/gcc/cobol/cdf-copy.cc: In member function
âint
    copybook_elem_t::open_file(const char*, bool)â:
    /vol/gcc/src/hg/master/local/gcc/cobol/cdf-copy.cc:317:34: error:
    âGLOB_BRACEâ was not declared in this scope; did you mean
âGLOB_ERRâ?
      317 |   static int flags = GLOB_MARK | GLOB_BRACE | GLOB_TILDE;
          |                                  ^~~~~~~~~~
          |                                  GLOB_ERR
    /vol/gcc/src/hg/master/local/gcc/cobol/cdf-copy.cc:317:47: error:
    âGLOB_TILDEâ was not declared in this scope
      317 |   static int flags = GLOB_MARK | GLOB_BRACE | GLOB_TILDE;
          |                                               ^~~~~~~~~~

    GLOB_BRACE and GLOB_TILDE are BSD extensions not in POSIX.1, thus
    missing on Solaris probably due to its System V heritage.

    This patch introduces fallback definitions to avoid this.

    Bootstrapped without regressions on amd64-pc-solaris2.11,
    sparcv9-sun-solaris2.11, and x86_64-pc-linux-gnu.

    2025-04-08  Rainer Orth  <r...@cebitec.uni-bielefeld.de>

            gcc/cobol:
            PR cobol/119217
            * cdf-copy.cc (GLOB_BRACE): Define fallback.
            (GLOB_TILDE): Likewise.

    (cherry picked from commit aacaa3b13bca508cb6cb803d11cb942b2de8c0db)

Reply via email to