🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: alt.os.linux.ubuntu
Article #122

Re: where to put custom headers

#122
From: frank
Date: Wed, 27 Jan 2010 04:38
34 lines
2441 bytes
Alan Curry wrote:
> In article <7rshd7Fa3vU1@mid.individual.net>,
> frank  <frank@example.invalid> wrote:
>>> dan@dan-desktop:~/source$ gcc -std=c99 -Wall -Wextra rd2.c -o out; ./out
>>> rd2.c: In function �process_directory�:
>>> rd2.c:40: warning: implicit declaration of function �readdir_r�
>>> rd2.c:48: warning: implicit declaration of function �lstat�
>>> rd2.c:66: warning: implicit declaration of function �readlink�
>>> dan@dan-desktop:~/source$ 
> 
> Every one of those functions has a "Feature Test Macro Requirements for
> glibc" note in the SYNOPSIS section of its man page. (If not, get some newer
> man pages.) Read those. Read the feature_test_macros(7) man page. Then add
> the necessary -D options to activate the set of features you want. WIth
> -std=c99 and no other feature-enabling macros defined, you get only the
> functions that are actually part of C99.
> 
> The quick way to enable just about everything is -D_GNU_SOURCE
> 

Bravo, Alan, you're always a clutch hitter.  I decided that I would use 
that in place of specifying a c standard, because I'm intentionally 
going to do things aren't defined by standard C as opposed to posix.

Given this intention, would you say this is an appropriate compile 
command line:

dan@dan-desktop:~/source$ gcc -D_GNU_SOURCE -Wall -Wextra rd3.c -o out

?  I'm not sure where I picked up -Wall and -Wextra.  Are they both 
still useful?

-- 
frank
Technical Details
Message-ID: <7s9u9uF6kkU1@mid.individual.net>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
References: <7ror8bFjn6U1@mid.individual.net> <4b578c9a$0$18138$a9266ab1@news.buzzardnews.com> <7rshd7Fa3vU1@mid.individual.net> <hjbk9j$s2d$1@speranza.aioe.org>

Show Full Headers
Complete Article Headers
X-Google-Thread: 1200bcf240,4af9266eb6a90621
X-Google-Attributes: gid1200bcf240,public,usenet
X-Google-NewGroupId: yes
X-Google-Language: ENGLISH,CP1252
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: frank <frank@example.invalid>
Newsgroups: alt.os.linux.ubuntu,gnu.gcc.help
Subject: Re: where to put custom headers
Date: Tue, 26 Jan 2010 21:38:20 -0700
Lines: 34
Message-ID: <7s9u9uF6kkU1@mid.individual.net>
References: <7ror8bFjn6U1@mid.individual.net> <4b578c9a$0$18138$a9266ab1@news.buzzardnews.com> <7rshd7Fa3vU1@mid.individual.net> <hjbk9j$s2d$1@speranza.aioe.org>
Mime-Version: 1.0
Content-Type: text/plain; charset=windows-1252; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: individual.net bZTYIAASUrCrGdb+WMFQpwCoTYzalPSK1IN4k+28FnoCSG+kkl
Cancel-Lock: sha1:2UGa9xO5znehlMblFKsuZ2s18yg=
User-Agent: Thunderbird 2.0.0.23 (X11/20090817)
In-Reply-To: <hjbk9j$s2d$1@speranza.aioe.org>