home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / os / os2 / programm / 4556 < prev    next >
Encoding:
Text File  |  1992-08-29  |  1.1 KB  |  24 lines

  1. Newsgroups: comp.os.os2.programmer
  2. Path: sparky!uunet!usc!rpi!usenet.coe.montana.edu!news.u.washington.edu!uw-beaver!ubc-cs!unixg.ubc.ca!kakwa.ucs.ualberta.ca!acs.ucalgary.ca!mahmad
  3. From: mahmad@acs.ucalgary.ca (Mohamed Ahmad)
  4. Subject: 16 bit alignment of struct members in GCC 2.1
  5. Sender: news@acs.ucalgary.ca (USENET News System)
  6. Message-ID: <92Aug29.164209.14207@acs.ucalgary.ca>
  7. Date: Sat, 29 Aug 92 16:42:09 GMT
  8. Nntp-Posting-Host: acs2.acs.ucalgary.ca
  9. Organization: The University of Calgary, Alberta
  10. Lines: 12
  11.  
  12.  
  13.     I have the file format for a DOS-based brain scanning
  14. machine in the form of a C structure.  Being of DOS (and hence 16
  15. bit) orgin, the struct members are 16-bit aligned.  I wish to
  16. read some files of this format under OS/2 2.0.  Unfortunately,
  17. when I compile the program using GCC 2.1, some variables
  18. (especially floats) are 32-bit aligned and so the struct no
  19. longer corresponds to the file format.  I have tried using GCC's
  20. ___attribute___(aligned((2))) statement to force 16-bit alignment
  21. but have had no success.  Any ideas?  Thanks in advance for any help.
  22.  
  23.                     Mohamed Ahmad
  24.