hdrchk v1.3 Copyright 1998 X/Open Company Ltd, a member of The Open Group hdrchk is a development tool. It performs a check on system headers for presence of function declarations, macro definitions and structures as defined in various standards. The standards supported by this tool are: FIPS 151-2 POSIX.1-1990 POSIX.1-1996 XPG3 XPG4 UNIX 98 Please note that this is not a compliance test tool, this does not check the function prototypes, namespace or other functional properties of the system headers. Installation To install the tool , gunzip the distribution file and extract the files from the tar archive tar zxvf ../hdrchk-1.3.tgz This will create a subdirectory containing the hdrchk tool and support files. cd hdrchk Set the TESTROOT environment variable to this directory export TESTROOT=`pwd` To run the tool ./hdrchk +++++++++++++++++++++++++++++++++++++ ********************************************************** ** Header Check Tool 1.3 ** ** Copyright (c) 1998 The Open Group ** ********************************************************** This tool is intended as a development tool to identify initial changes required to system headers. This is not a conformance test tool and does not check for namespace compliance or other functional checks on header contents. In each of the following questions, the default answer in square brackets will be used if a carriage return alone is typed. If !shell command is typed, the command will be sent to sh(1) to be executed. `!' on its own stands for `!sh'. *** The hdrchk source directory is rooted at /usr/tet/hdrchk/SRC Setting defaults from: params.data/.defaults Which test mode do you require (from: FIPS POSIX90 POSIX96 XPG3 XPG4 UNIX98) [UNIX98]? ++++++++++++++++++++++++++++++++++++++ Hitting return defaults to UNIX 98 mode , you then get a choice for which subsets or features you'd like to check Selecting them all "base dynl lfs mse realtime threads" , will check for all UNIX 98 features. +++++++++++++++++++++++++++++++++++++++++++++++++ ** hdrchk subsets supporting UNIX98 mode are available from the ** following test packages: ISO C MSE Extensions (mse) Realtime Headers (realtime) Threads Headers (threads) UNIX 98 Large File Summit Headers (lfs) XPG4 Base Headers (base) Which subsets do you wish to install? Enter a space-separated list including one or more of: base dynl lfs mse realtime threads [base dynl lfs mse realtime threads] +++++++++++++++++++++++++++++++++++++++++++++++++ You then get the opportunity to input the location of the system include directories, the C compiler name and what command line options are needed. ++++++++++++++++++++++++++++++++++++++++++++++++++++ The system include directories (in order of searching) are: /usr/include Is this correct (y/n) [y]? What is your C compiler called (must be c89 for UNIX98 registration runs) [/usr/bin/cc]? What command line options does your C compiler need [none]? ++++++++++++++++++++++++++++++++++++++++++++++++++++ At this point the system headers are checked. An output report is also produced in the file SRC/report.h listing the missing symbols . ++++++++++++++++++++++++++++++++++++++++++++++++++++ Determining missing #defines and #includes ... *** Starting aio.h Missing #include file: aio.h *** Completed aio.h *** Starting assert.h *** Completed assert.h *** Starting cpio.h Missing #include file: cpio.h *** Completed cpio.h *** Starting ctype.h *** Completed ctype.h *** Starting dirent.h Missing: extern void seekdir(); Missing: extern long telldir(); *** Completed dirent.h etc.. *** Completed wctype.h *** Starting wordexp.h Missing: #define WRDE_NOSYS (-1) *** Completed wordexp.h ********************************************************** ** Header check complete ** ********************************************************** The hdrchk parameters file is /usr/tet/hdrchk/SRC/params The hdrchk output report file is /usr/tet/hdrchk/SRC/report.h ++++++++++++++++++++++++++++++++++++++++++++++++++++ The report.h output file is produced containing sets of missing definitions etc. A sample extract follows, note that where (-1) is put out for a definition , the implementation should supply an appropriate value. +++++++++++++++++++++++++++++++++++++++++++++ /****** This file contains definitions for those elements which ******/ /****** 'incrpt' found to be missing from the system include files ******/ /****** - Missing include file ******/ /****** Start of Definitions for file aio.h ******/ #define AIO_ALLDONE (-1) #define AIO_CANCELED (-1) #define AIO_NOTCANCELED (-1) #define LIO_NOP (-1) #define LIO_NOWAIT (-1) #define LIO_READ (-1) #define LIO_WAIT (-1) #define LIO_WRITE (-1) extern int aio_cancel(); symbol matching /aio_error/ extern int aio_fsync(); extern int aio_read(); extern ssize_t aio_return(); etc /****** End of Definitions for file aio.h ******/ /****** - Missing include file ******/ /****** Start of Definitions for file cpio.h ******/ #define C_IRGRP 0000040 #define C_IROTH 0000004 #define C_IRUSR 0000400 #define C_ISBLK 0060000 #define C_ISCHR 0020000 #define C_ISCTG 0110000 #define C_ISDIR 0040000 #define C_ISFIFO 0010000 #define C_ISGID 0002000 #define C_ISLNK 0120000 etc.. /****** - Missing include file ******/ /****** Start of Definitions for file inttypes.h ******/ typedef int16_t; typedef int32_t; typedef int8_t; typedef intptr_t; typedef uint16_t; typedef uint32_t; typedef uint8_t; typedef uintptr_t; /****** End of Definitions for file inttypes.h ******/