public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Vinaya Dandur <mail2vinaya@gmail.com>
To: psmith@gnu.org
Cc: "gcc@gcc.gnu.org" <gcc@gcc.gnu.org>
Subject: Re: GCC 4.8.1 unable to compile a .c File
Date: Tue, 26 Mar 2019 13:07:00 -0000	[thread overview]
Message-ID: <CALXG7o_zsaOEkq+r-RjLVyBnHcUO+czA152+5EV9JBL2J1eoqA@mail.gmail.com> (raw)
In-Reply-To: <037fc66e90018e28bfad0309f4d5939fc3e1d7b1.camel@gnu.org>

The suggestion worked like magic. Thanks.

Thanks and Regards,
Vinaya D R


On Sat, Mar 23, 2019 at 11:53 PM Paul Smith <psmith@gnu.org> wrote:

> On Sat, 2019-03-23 at 22:54 +0530, Vinaya Dandur wrote:
> > My mistake. Thanks, but even if you include <signal.h> the issue still
> > exists. Yes TRAP_BRKPT is not included in signal.h, however gcc somehow
> > finds the definition for TRAP_BRKPT and I don't know how. This works in
> > other hosts.
>
> A peruse of the sigaction man page for GNU/Linux might be enlightening:
>
> http://man7.org/linux/man-pages/man2/sigaction.2.html
>
> > Since glibc 2.20, the definitions of most of these symbols are
> > obtained from <signal.h> by defining feature test macros (before
> > including any header file) as follows:
> >
> >   *  _XOPEN_SOURCE with the value 500 or greater;
> >   *  _XOPEN_SOURCE and _XOPEN_SOURCE_EXTENDED; or
> >   *  _POSIX_C_SOURCE with the value 200809L or greater.
> >
> > For the TRAP_* constants, the symbol definitions are provided only
> > in the first two cases.  Before glibc 2.20, no feature test macros
> > were required to obtain these symbols.
>
> So if you add #define _XOPEN_SOURCE 500 or both #define _XOPEN_SOURCE
> and #define _XOPEN_SOURCE_EXTENDED before your first #include, or if
> you add -D_XOPEN_SOURCE=500 or both -D_XOPEN_SOURCE and
> -D_XOPEN_SOURCE_EXTENDED to your compile line, then things should work.
>
> This is a question related to the GNU libc project, not GCC.
>
>

      parent reply	other threads:[~2019-03-26 13:07 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-23 15:14 Vinaya Dandur
2019-03-23 16:22 ` Jonathan Wakely
2019-03-23 16:25   ` Vinaya Dandur
2019-03-23 16:46     ` Paul Smith
2019-03-23 17:08     ` Jonathan Wakely
2019-03-23 17:25       ` Vinaya Dandur
2019-03-23 18:24         ` Paul Smith
2019-03-24  0:50           ` Vinaya Dandur
2019-03-26 13:07           ` Vinaya Dandur [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CALXG7o_zsaOEkq+r-RjLVyBnHcUO+czA152+5EV9JBL2J1eoqA@mail.gmail.com \
    --to=mail2vinaya@gmail.com \
    --cc=gcc@gcc.gnu.org \
    --cc=psmith@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).