home *** CD-ROM | disk | FTP | other *** search
/ ProfitPress Mega CDROM2 …eeware (MSDOS)(1992)(Eng) / ProfitPress-MegaCDROM2.B6I / PROG / DJGPP / DJDOC106.ZIP / DOCS / LIBC.DOC < prev    next >
Encoding:
Text File  |  1991-03-06  |  2.2 KB  |  74 lines

  1. /* History:69,1 */
  2. This is file libc.doc
  3.  
  4. Contents:
  5.  
  6. * Features added to libc.a
  7. * Features missing from libc.a
  8. * C++ support in libc.a
  9.  
  10.  
  11.  
  12.  
  13.  
  14.  
  15. Features added to libc.a:
  16.  
  17. open() has an O_TEXT and O_BINARY in <fcntl.h> to select text or binary
  18. files, kind-of-like Turbo-C's method.
  19.  
  20. fopen() etc.  now allows a 't' option to denote a DOS text file (an
  21. _IOTEXT flag in struct FILE tags this), or 'b' to denote a binary (unix
  22. text) file.  For example, fopen("foo", "rt") opens a text file.  By
  23. default, DOS-style files are used.  stdin, stdout, stderr are text
  24. files. To change the default, set the global variable _ftype to O_TEXT
  25. or O_BINARY.
  26.  
  27. Both BSD-style bcopy(), bzero(), and bcmp() and SYSV-style memcpy(), memset(),
  28. memcmp() are supported.  bcopy() and memcpy() *can* handle overlapping
  29. strings properly, although I've been told that most "real" operating systems
  30. aren't smart enough to do this simple task, so be careful.
  31.  
  32. BSD-style readv() and writev() are supported.
  33.  
  34. alloca, obstacks, and gnu's malloc() are included.  GCC has a built-in
  35. alloca also, which gets used if you include nearly any .h file in
  36. /usr/include.
  37.  
  38. The time() functions are set to assume PC time is local time, but
  39. obey the TZ environment variable as in BSD documentation, as long as
  40. you don't need the tzone files (ie: set tz=EST5 works).
  41.  
  42. gettimeofday() is accurate to 18.2 Hz, but reports 100 Hz.
  43. getrusage() returns 0 the first time you call it, and reports 100 Hz.
  44.  
  45. system() is supported, buy fork()/exec() and spawn() aren't.  System()
  46. will return the exit code of the child process.
  47.  
  48.  
  49.  
  50.  
  51.  
  52. Features missing in libc.a:
  53.  
  54. Anything dealing with multi-user stuff.  chown(), chmod(), chgrp(), etc.
  55. are null functions.  You can't even create a read-only file.
  56.  
  57. Anything that assumes "standard files", like /etc/passwd (pwopen()).
  58.  
  59. Curses
  60.  
  61.  
  62.  
  63.  
  64.  
  65. C++ support:
  66.  
  67. All required extensions, and all modules for standard objects, are
  68. built into libc.a.  No special action is required to utilize C++ features.
  69. C++ is the recommended language for this set of utilities, and takes
  70. only slightly longer to compile.
  71.  
  72. Some of the .h files for C++ have had underscores added to avoid MS-DOS's
  73. caselessness causing a conflict.  For examle, String.h became _string.h.
  74.