Re: enabling #ident in Apple gcc
Re: enabling #ident in Apple gcc
- Subject: Re: enabling #ident in Apple gcc
- From: "Shawn Erickson" <email@hidden>
- Date: Mon, 14 Apr 2008 16:08:08 -0700
On Mon, Apr 14, 2008 at 11:59 AM, Chris Inacio <email@hidden> wrote:
> I work on developing cross platform software, (YAF, libfixbuf,) which runs
> on multiple varieties of Unix/POSIX. We have started to put:
>
> #ident "$Id$
>
> into our code to be able to use the ident command to find version numbers.
> This works on all platforms I've tested with all the compilers I've tested,
> (Linux, Solaris, gcc, Sun Pro, Intel C) except for Mac OS. It doesn't cause
> an error on Mac OS, it just doesn't work.
<http://developer.apple.com/documentation/Darwin/Reference/ManPages/man1/ident.1.html>
---
<http://gcc.gnu.org/onlinedocs/cpp/Other-Directives.html>
8 Other Directives
The '#ident' directive takes one argument, a string constant. On some
systems, that string
constant is copied into a special segment of the ob ject file. On other
systems, the directive
is ignored. The '#sccs' directive is a synonym for '#ident'.
These directives are not part of the C standard, but they are not
official GNU extensions
either. What historical information we have been able to find, suggests
they originated with
System V.
The null directive consists of a '#' followed by a newline, with only
whitespace (including
comments) in between. A null directive is understood as a
preprocessing directive but has
no effect on the preprocessor output. The primary significance of the
existence of the null
directive is that an input line consisting of just a '#' will produce
no output, rather than a
line of output containing just a '#'. Supposedly some old C programs
contain such lines.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden