home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / gnu / gcc / help / 2990 < prev    next >
Encoding:
Internet Message Format  |  1993-01-21  |  2.4 KB

  1. Path: sparky!uunet!olivea!sgigate!sgi!wdl1!wdl1!mdm
  2. From: mdm@wdl1.wdl.loral.com (Mike D Marchionna)
  3. Newsgroups: gnu.gcc.help
  4. Subject: Re: gnu gcc compiler on VMS (1.42) question on run-time library
  5. Message-ID: <1993Jan21.190336.11458@wdl.loral.com>
  6. Date: 21 Jan 93 19:03:36 GMT
  7. References: <1993Jan21.040409.13612@netcom.com>
  8. Sender: news@wdl.loral.com
  9. Organization: Loral Western Development Labs
  10. Lines: 38
  11.  
  12. rbp@netcom.com (Bob Pasker) writes:
  13.  
  14. >it seems that the functions i would expect to be included with a C
  15. >compiler have not come with GNU C, but instead the directions tell me
  16. >to link with the VAX C run-time library (VAXCRTL).  so, still ok, i
  17. >have an old version of the VAX C complier on the machine (VAX-11 C
  18. >2.3).
  19.  
  20. >now, however, i see that there is a difference (bug?) in the VAXCRTL
  21. >function versus the function included in the DOS compiler that i am
  22. >busily converting from.  the function read() is supposed to read the
  23. >*exact* number of bytes (up to EOF), but the read() from VAXCRTL seems
  24. >to act more like fgets() and returns only the first *line* of the
  25. >file.
  26.  
  27. >can anyone shed some light on (1) why the GNU compiler doesnt have
  28. >these intrinsic functions? if i didn't have the VAXCRTL would i be
  29. >SOL? (2) why my read() of 720 bytes from a 720 byte file returns only
  30. >the first 24 bytes (the first line)?
  31.  
  32. This is entirely the fault of the VAXCTRL which implements the open/read
  33. /write/lseek/close system calls on top of the RMS File System.  I don't
  34. know if they fixed it any from the last time I gave up in frustration.
  35. The problem is that the RMS system is inherently record oriented.  The
  36. result is that lseeks and reads tend to only work well when the read pointer
  37. is on a record boundary for certain file types.  The closest you can
  38. get to a DOS or UNIX file is to specify that you want STREAM_LF record
  39. structure via the RMS extension to the open function.  Basically your
  40. in for a big pain in the ass if you need to do anything but sequential line
  41. by line I/O or direct fixed length record access.  Try rereading the RMS
  42. extension described in the VAX C manual for more details.
  43.  
  44. --MDM
  45. -- 
  46.  _________________________________________________________________________ 
  47. (  _______________________________   Brain, and brain!  What is brain!    ) 
  48.  \________________________________)        --Star Trek (Spock's Brain)   /
  49. El_Rayo_X_______________________________________________________________/ 
  50.