defines

The defines program is a combination of a ksh script, C code and a data file. It also executes your C compiler.

Execute defines as follows:

   defines [-c compiler] 
The -c parameter gives the program name of your compiler. The gcc compiler is assumed as a default.

The defines script builds a C program and then compiles it. The program uses all of the definitions found in defines.list. The script displays all of definitions recognised by the compiler along with the defined values.

Example

sms> defines
__BASE_FILE__   = "/tmp/8612.c"
__DATE__        = "Oct 25 2005"
__FILE__        = "/tmp/8612.c"
__GNUC_MINOR__  = 3
__GNUC_PATCHLEVEL__     = 5
__GNUC__        = 3
__INCLUDE_LEVEL__       = 0
__LINE__        = 72
__REGISTER_PREFIX__     =
__STDC_HOSTED__ = 1
__STDC__        = 1
__TIME__        = "20:37:44"
__USER_LABEL_PREFIX__   =
__VERSION__     = "3.3.5 20050117 (prerelease) (SUSE Linux)"
i386    = 1
unix    = 1
sms>

Files

defines

The defines script must be given executable permissions. It may need modifying:

defines.list

defines.list lists all of the definitions recognised by the compilers I know about. You may wish to add to this list.

Home