Sponsored Content
Full Discussion: what is #ident
Top Forums Programming what is #ident Post 302068719 by Perderabo on Monday 20th of March 2006 04:20:15 PM
Old 03-20-2006
There is a program called "what" that will look inside executables and look for strings that have @(#) in them and display these strings. So originally you would do stuff like:
char ident[] = "@(#) something goes here";
to leave data for "what" to find. This means that string is part of your program and consumes space. When the new format for object files called elf came out, it had support for this stuff in the format. It's a special segment that exists in the file but is not loaded when the program runs. Compilers written by people who think standards are a good thing have a pragma to access this:
#pragma ident "@(#) something goes here"
From what you say, I guess that there is a compiler with a non-standard preprocessing directive.

In a shell script, it would just be a comment. With the @(#), "what" will still find it.

These "what strings" are often generated automatically by SCCS or RCS or CVS or similiar packages.
 

4 More Discussions You Might Find Interesting

1. Programming

Regarding #ident macro

Hi, In my application I have some number c files. In each of the file the following line will be the first statement. #ident "@(#) set.c 14.1.2.2 05/15/01 17:06:32" I would like to know what is the use of the above statement. Thanks Sarwan (1 Reply)
Discussion started by: sarwan
1 Replies

2. AIX

problem with #ident

I have an application which was originally compiled for AIX 4.3.3 which I am trying to compile with xlc 8 on aix 5.2. This app defines a macro called IDENT. Unfortunately, /usr/include/curses.h checks if IDENT is defined and if so, then defines #ident. Since #ident is apparently not supported by... (2 Replies)
Discussion started by: erick00
2 Replies

3. UNIX and Linux Applications

How to change ident in ircII

In ircII, how do I change the username and real name that shows up in the /whois ? (1 Reply)
Discussion started by: guitarscn
1 Replies

4. UNIX for Dummies Questions & Answers

sendmail auth/ident checking issue

Hi All, I have a problem sending mail to a host which seems to have sendmail configured to use Ident port (113) to check back on the mail sender. My problem is that this port is not enabled on the firewalls between sender and receiver so the ident checking and hence the mail is failing and... (0 Replies)
Discussion started by: Jublio
0 Replies
IDENT(1)						      General Commands Manual							  IDENT(1)

NAME
ident - identify RCS keyword strings in files SYNOPSIS
ident [ -q ] [ -V ] [ file ... ] DESCRIPTION
ident searches for all instances of the pattern $keyword: text $ in the named files or, if no files are named, the standard input. These patterns are normally inserted automatically by the RCS command co(1), but can also be inserted manually. The option -q suppresses the warning given if there are no patterns in a file. The option -V prints ident's version number. ident works on text files as well as object files and dumps. For example, if the C program in f.c contains #include stdio.h static char const rcsid[] = "$Id: f.c,v $"; int main() { return printf("%s ", rcsid) == EOF; } and f.c is compiled into f.o, then the command ident f.c f.o will output f.c: $Id: f.c,v $ f.o: $Id: f.c,v $ If a C program defines a string like rcsid above but does not use it, lint(1) may complain, and some C compilers will optimize away the string. The most reliable solution is to have the program use the rcsid string, as shown in the example above. ident finds all instances of the $keyword: text $ pattern, even if keyword is not actually an RCS-supported keyword. This gives you infor- mation about nonstandard keywords like $XConsortium$. KEYWORDS
Here is the list of keywords currently maintained by co(1). All times are given in Coordinated Universal Time (UTC, sometimes called GMT) by default, but if the files were checked out with co's -zzone option, times are given with a numeric time zone indication appended. $Author$ The login name of the user who checked in the revision. $Date$ The date and time the revision was checked in. $Header$ A standard header containing the full pathname of the RCS file, the revision number, the date and time, the author, the state, and the locker (if locked). $Id$ Same as $Header$, except that the RCS filename is without a path. $Locker$ The login name of the user who locked the revision (empty if not locked). $Log$ The log message supplied during checkin. For ident's purposes, this is equivalent to $RCSfile$. $Name$ The symbolic name used to check out the revision, if any. $RCSfile$ The name of the RCS file without a path. $Revision$ The revision number assigned to the revision. $Source$ The full pathname of the RCS file. $State$ The state assigned to the revision with the -s option of rcs(1) or ci(1). co(1) represents the following characters in keyword values by escape sequences to keep keyword strings well-formed. char escape sequence tab newline space 40 $ 44 \ IDENTIFICATION
Author: Walter F. Tichy. Manual Page Revision: ; Release Date: . Copyright (C) 1982, 1988, 1989 Walter F. Tichy. Copyright (C) 1990, 1992, 1993 Paul Eggert. SEE ALSO
ci(1), co(1), rcs(1), rcsdiff(1), rcsintro(1), rcsmerge(1), rlog(1), rcsfile(5) Walter F. Tichy, RCS--A System for Version Control, Software--Practice Experience 15, 7 (July 1985), 637-654. GNU IDENT(1)
All times are GMT -4. The time now is 03:43 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy