emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: GTK patches part 2


From: Eric Gillespie
Subject: Re: GTK patches part 2
Date: Tue, 10 Dec 2002 16:23:59 -0500
User-agent: nmh/1.0.4+dev (i386-unknown-netbsdelf1.6)

"Jan D." <address@hidden> writes:

> > You can't rely on that.  If *you* make reference to symbols or
> > macros, *you* need to include the appropriate header file,
> > regardless of whether or not some other header you include also
> > needs that header file.  Sometimes people just dump all their
> 
> There is no such requrement in the C standard, even if it makes
> sense for some people.

Who said anything about the standard?  Standards have nothing to
do with this.  The fact is that if you don't include relevant
headers yourself (having them in local header files such as
config.h as you mention below counts as "yourself", of course),
you cannot count on the declarations being available.  Unless
you only want the program to work on your system, of course (no,
i'm not accusing you of that, i know it was a simple mistake :).

> For example, stdlib.h is included by config.h, so it is clearly

Whoops.  When i noticed the stderr problem also noticed malloc
being called with no stdlib.h.  As i said, my preferred style
would be to go ahead and explicitly include stdlib.h in gtkutil.c
itself.  But i don't get to make such decisions for emacs, nor do
i want to; it works and that's all that matters to me.

> redundant to do so elsewhere.  I can put in stdio.h just for the
> sake of portability.

Thanks.

Just out of curiosity, which header included stdio.h for you on
your system?

--  
Eric Gillespie <*> address@hidden

Build a fire for a man, and he'll be warm for a day.  Set a man on
fire, and he'll be warm for the rest of his life. -Terry Pratchett



reply via email to

[Prev in Thread] Current Thread [Next in Thread]