home *** CD-ROM | disk | FTP | other *** search
/ rtsi.com / 2014.01.www.rtsi.com.tar / www.rtsi.com / OS9 / OSK / EFFO / forum7.lzh / RICO / C / CONFIG / readme < prev   
Text File  |  2009-11-06  |  2KB  |  45 lines

  1.         config.c - a C configuration enquirer
  2.         Author: Steven Pemberton, CWI, Amsterdam
  3.  
  4. This program determines properties of your machine and C compiler, such as
  5. the number of bits used for certain data-types, the accuracy of float and
  6. double, and so on.
  7.  
  8. The original purpose of the program was to generate a header-file for a
  9. large piece of software that must be as portable as possible. However, it is
  10. also a good check for a new compiler. It is the descendent of a similar
  11. program I posted a year or so ago. However it is completely rewritten, and
  12. incorporates much experience with the use of that program, and ideas from
  13. users of it.
  14.  
  15. The program only works if overflows are ignored by the C system or are
  16. catchable by signal().
  17.  
  18. If your C system is not unix but does have signal/setjmp, compile with
  19.     cc -DSIGNAL config.c
  20. otherwise with
  21.     cc config.c
  22. Don't use any optimisation flags.
  23. Some compilers need a -f flag for floating point.
  24.  
  25. You may need to add some calls to signal() for other sorts of exception on
  26. your machine than SIGFPE, and SIGOVER. See lines beginning #ifdef SIGNAL
  27. later in the program.
  28.  
  29. Output is produced as C style comments so that the program can be used to
  30. produce a .h file with minimum upheaval.
  31.  
  32. I apologise unreservedly for the contorted use of the preprocessor...
  33.  
  34. If your C preprocessor doesn't have the predefined __FILE__ macro, and you
  35. want to call the file anything other than config.c, change the first
  36. #define command accordingly.
  37.  
  38. Any ideas for future enhancements, and all fixes to make it run on machines
  39. where it doesn't currently run, will be gratefully received. Please mail me
  40. at
  41.     steven@cwi.nl (new style) or seismo!mcvax!steven (old style)
  42.  
  43. Steven Pemberton, Centre for Mathematics and Computer Science
  44. Amsterdam, The Netherlands
  45.