home *** CD-ROM | disk | FTP | other *** search
/ RISC DISC 1 / RISC_DISC_1.iso / pd_share / code / unixlib / !UnixLib / ReadMe36d < prev    next >
Encoding:
Text File  |  1994-07-28  |  5.6 KB  |  189 lines

  1.         For UnixLib 3.6d, I have now taken over support from Huw Rogers, and
  2. I can be contacted at the following addresses. Please ignore the addresses
  3. given for Huw Rogers.
  4.  
  5. E-mail:
  6.         UnixLib@callan.co.uk
  7.  
  8. Post:
  9.         Simon Callan
  10.         11 Northmead
  11.         Redhill
  12.         Surrey
  13.         RH1 2ED
  14.  
  15.  
  16. This is a rough, partial guide to what I have changed / improved / corrected
  17. in UnixLib3.6c to get it to work for GCC / G++
  18.  
  19. Thanks go to the various people who have supplied various bug-fixes,
  20. especially Alun Jones, even if he does report problems, just after I make
  21. changes that make it harder to locate the bugs.
  22.  
  23. Please note that ReadMe36c is slightly out of date, and you should ignore
  24. references to the !Boot and !alias files.
  25.  
  26. Installation for GCC
  27. ====================
  28.  
  29. For GCC to work with Unixlib, two variable need to be set up. These are
  30. Unix$path amd UnixFS$/tmp. Unix$Path shpuld point to the clib directory,
  31. with a trailing dot. UnixFS$/tmp should point to your scrap directory. This
  32. can be done by putting similar to to the following lines into your boot
  33. sequence.
  34.  
  35. *set Unix$Path ADFS::IDEDisc4.$.Usr.Develop.UnixLib36d.clib.
  36. *set UnixFS$/tmp <Wimp$ScrapDir>
  37.  
  38. gcc changes
  39. ===========
  40.  
  41. All header files have had appropriate checks for C/C++ compilation, so that
  42. C function names are not mangled when compiling C++ sources.
  43.  
  44. Number of atexit functions that can be registered has been increased to 33,
  45. so that global C++ destructors can be called
  46.  
  47. Allow for command lines of upto 1K bytes in length, as gcc can generate
  48. command lines of greater than 255 bytes.
  49.  
  50. Increase size of print buffers to 4K, as otherwise the c code generators
  51. dont generate correct code.
  52.  
  53. __uname(): for ncc compatability, we need to truncate filename of greater
  54. than 10 characters, rather than dropping vowels.
  55.  
  56. Add startup code so that C++ global constructors are called at program
  57. startup.
  58.  
  59. Incompatibilities between what GCC expects the type of error variables, and
  60. what UnixLib declares them as.
  61.  
  62. Bugs
  63. ====
  64.  
  65. If SIGSTAK is raised, an infinite loop is entered, as signal checks the
  66. stack and raises a SIGSTAK signal. Also the stack backtrace is improved
  67.  
  68. strncmp(): zero length strings were treated as 1 byte long.
  69.  
  70. memcmp(): problems with identical blocks of memory not being properly
  71. compared.
  72.  
  73. strchr(): could not find '\0' in a string.
  74.  
  75. __tmpnam(): bug that resulted in general corruption
  76.  
  77. getcwd(): corrupted the PSD. Also uses OS_Args 7 and Prefix$Dir if they can
  78. be used.
  79.  
  80. dirent(): now works with more than one open directory
  81.  
  82. stat(): Now works for Image directories.
  83.  
  84. _wr#chk functions have the wrong start address for checking the address.
  85.  
  86. If Unix$tty is set, UnixLib corrupts the heap, by trying to free part of the
  87. code!
  88.  
  89. General
  90. =======
  91.  
  92. To aid debuging, the assembler routines have had their names embeded in the
  93. code.
  94.  
  95. DRLink
  96. ======
  97.  
  98. There is a bug in DRLink that results in the offset of the entry point to be
  99. ignored, so I have moved the entry code to the start of the AREA.
  100.  
  101. Header files
  102. ============
  103.  
  104. All files have had appropriate 'extern "C"' statements added to prevent the
  105. C++ compiler mangling function names.
  106.  
  107. Minor problem of include files using include "" rather than <>.
  108.  
  109. alloca.h: GCC insists on using its own, internal version of alloca() if it
  110. can. This does not work under RISC-OS, therefore I have arrenged that GCC
  111. wont recognise alloca().
  112.  
  113. assert.h: Minor problem with K&R and ANSI C preprocesor.
  114.  
  115. dirent.h: 'struct direct' renamed to 'struct dirent'
  116.  
  117. errno.h: sys_nerr changed from 'const int' to 'int' - due to
  118. incompatabilities with GCC declaration. errno changed to __errno and errno
  119. #defined as __errno.
  120.  
  121. pwd.h: removed non STDC declarations of some functions.
  122.  
  123. stdarg.h: ensure that varargs.h / stdargs.h don't clash.
  124.  
  125. stdio.h: increase size of output buffer from 1K to 4K
  126.  
  127. stdlib.h: increase maximum number of atexit function that can be registered,
  128. as C++ needs one.
  129.  
  130. termcap.h: remove non-ANSI declarations.
  131.  
  132. unistd.h: added bits for preventing __uname() for packing filenames
  133.  
  134. sys/fcntl.h include fcntl.h
  135.  
  136. sys/file.h: GCC insists on including this.
  137.  
  138. sys/param.h: bits for DDE command line.
  139.  
  140. sys/syslib.h: bits for C++ startup code.
  141.  
  142. sys.tty.h: include termio.h if not included.
  143.  
  144. -----------------------------------------------------------------------------
  145.  
  146. Makefile: obvious
  147.  
  148. -----------------------------------------------------------------------------
  149.  
  150. src.c.atexit: changes to allow 33 atexit() functions.
  151.  
  152. src.c.memcmp: correct bug in memcmp()
  153.  
  154. src.c.strcmp(): correct bug in strncmp(), which prevents 0 length strings
  155. comparing correctly.
  156.  
  157. stdio.c.print: increase print buffer to 4K.
  158.  
  159. stdio.c.debug: add bit to shut up cc.
  160.  
  161. sys.c.errlist: change sys_nerr from 'const int' to 'int'
  162.  
  163. sys.c.exec: add code to use DDE utils if needed.
  164.  
  165. sys.c.signal: turn off stack checking, as otherwise a SIGSTAK causes an
  166. infinite loop. Improve stack backtrace.
  167.  
  168. sys.c.sysclib: C++ initialisation code. Also set __uname() non-pack facility.
  169.  
  170. sys.c.vfork: code for DDE commandline.
  171.  
  172. Assembler code: add debuging info - routine names to all assembler sources.
  173.  
  174. src.sys.s._signal: rename errno to __errno
  175.  
  176. src.sys.s.__syslib: Move entry code to start of AREA, as drlink ignores the
  177. offset value specified in the ENTRYPOINT field. add point to base of r/w
  178. area. Set up dont pack indicator for __uname(). add bits for C++
  179. constructors. Change _wr#chk to correctly check start address. set up
  180. __rwbase for write checking.
  181.  
  182. src.unix.c.dirent: rename struct direct to struct dirent.
  183.  
  184. src.unix.c.getcwd / getwd: function getwd() changed to getcwd(), which seems correct.
  185.  
  186. src.unix.c.uname: if file name is > 10 chars, dont pack if requested.
  187.  
  188. src.unix.c.unix: use DDE utils if required. Correct bug that corrupts heap
  189. if Unix$tty is set.