From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 89582 invoked by alias); 26 Mar 2019 13:07:00 -0000 Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org Received: (qmail 89568 invoked by uid 89); 26 Mar 2019 13:06:59 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-1.8 required=5.0 tests=AWL,BAYES_50,FREEMAIL_FROM,HTML_MESSAGE,KAM_SHORT,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.1 spammy=H*f:sk:pNj8RSZ, Dandur, H*f:sk:NYKGn-P, H*f:sk:D21Nyom X-HELO: mail-ot1-f46.google.com Received: from mail-ot1-f46.google.com (HELO mail-ot1-f46.google.com) (209.85.210.46) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 26 Mar 2019 13:06:54 +0000 Received: by mail-ot1-f46.google.com with SMTP id d24so11312485otl.11 for ; Tue, 26 Mar 2019 06:06:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=3cVF+CJilUcsPLS3L3v5QAd5fzlHnF6dWhhoetsO+sQ=; b=V0g300nnFqTW9R0PTdWniMc+Fc9hVQ4Ntva3asGJxDylbUmE3UYgOppTLoa9s9POIG 2LFIJ5za+HGSt07eRqgMv6i73DnWkMauuLpfURmO2NcTEOqRKuabDqqcY35xduiHHd7M SN6uIObE9dhGDZvUqJNoi5WLwStc1mWb4ORbB6JBz7uSRWVdR+Zg3dXEqIh6YKB9AQ/j sL+P36N3ADUNHu7oXsfBarCOWRhQIzPtI5DRCM1DW0I9nsn3qubah7ICLNHxNgcnoMUH PSvQjvrUqKy6fMI8azCCxDyMMLuivIE3iPSKNxtqgCKCSvUTObhOyY252Ap0ESctpQl5 VFDA== MIME-Version: 1.0 References: <037fc66e90018e28bfad0309f4d5939fc3e1d7b1.camel@gnu.org> In-Reply-To: <037fc66e90018e28bfad0309f4d5939fc3e1d7b1.camel@gnu.org> From: Vinaya Dandur Date: Tue, 26 Mar 2019 13:07:00 -0000 Message-ID: Subject: Re: GCC 4.8.1 unable to compile a .c File To: psmith@gnu.org Cc: "gcc@gcc.gnu.org" Content-Type: text/plain; charset="UTF-8" X-SW-Source: 2019-03/txt/msg00211.txt.bz2 The suggestion worked like magic. Thanks. Thanks and Regards, Vinaya D R On Sat, Mar 23, 2019 at 11:53 PM Paul Smith wrote: > On Sat, 2019-03-23 at 22:54 +0530, Vinaya Dandur wrote: > > My mistake. Thanks, but even if you include 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 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. > >