www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/04/29/01:09:25

Xref: news2.mv.net comp.os.msdos.djgpp:3223
From: br516 AT FreeNet DOT Carleton DOT CA (Nicholas Lynch)
Newsgroups: comp.os.msdos.djgpp
Subject: sizeof(int) == 4?!
Date: 28 Apr 1996 15:43:41 GMT
Organization: The National Capital FreeNet
Lines: 31
Sender: br516 AT freenet3 DOT carleton DOT ca (Nicholas Lynch)
Message-ID: <4m03nd$nsc@freenet-news.carleton.ca>
Reply-To: br516 AT FreeNet DOT Carleton DOT CA (Nicholas Lynch)
NNTP-Posting-Host: freenet3.carleton.ca
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

 I was having some trouble using a structure to load a file header in DJGPP.
I found that it worked in borland C no problem. So, I wrote a little test
program that would give me the sizes of several data types:

Borland C/C++:

  Variable         Size
  ---------------------
  int              2
  unsigned int     2
  long             4
  ...

But in DJGPP:

  Variable         Size
  ---------------------
  int              4
  unsigned int     4
  long             4
  ...

 Is there any way of correcting this? (I belive that this problem cropped up
earlier in thee newsgroup, but I didn't save the solution :( Or, should I
just use a different data type instead of int?

 Thanks in advance...
--
   O                   Nicholas Lynch
  -|-                 br516 AT freenet DOT carleton DOT ca
  / \

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019