develooper Front page | perl.perl5.porters | Postings from September 2003

Re: Interesting - [drow@mvista.com: A user's experiences with GCC-3.4 snapshots]

Thread Previous | Thread Next
From:
Chip Salzenberg
Date:
September 16, 2003 14:55
Subject:
Re: Interesting - [drow@mvista.com: A user's experiences with GCC-3.4 snapshots]
Message ID:
20030916215536.GA15294@perlsupport.com
According to Enache Adrian:
> On Tue, Sep 16, 2003 at 02:31:58PM -0500, Art Haas wrote:
> > $ cat try.c
> > #include <stdio.h>
> > int main() { extern void *setproctitle(); if(&setproctitle) return(0); else return(1); }
> 
> The C standard guarantees that the address of a function will never
> compare equal to NULL.

Hm, I wonder ... does ELF have a way to say "I want the value of this
symbol, but if it's not defined, then I'll take zero instead"?  If so,
and if the declaration of setproctitle() had such a qualifier on it,
then this test would be reasonable.

Not that I'm suggesting it's valid as it stands.
-- 
Chip Salzenberg               - a.k.a. -               <chip@pobox.com>
"I wanted to play hopscotch with the impenetrable mystery of existence,
    but he stepped in a wormhole and had to go in early."  // MST3K

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About