www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/12/05/02:36:51

Message-ID: <B5E044AF4430D311B24D0060089CD8B101F018C0@hydmail01.hyd.wilco-int.com>
From: Prashant Ramachandra <rprash AT wilco-int DOT com>
To: "'djgpp AT delorie DOT com'" <djgpp AT delorie DOT com>
Subject: RE: what is __attribute__ ((packed));
Date: Tue, 5 Dec 2000 12:33:58 +0530
MIME-Version: 1.0
X-Mailer: Internet Mail Service (5.5.2650.21)
Reply-To: djgpp AT delorie DOT com

On Tuesday, December 05, 2000 6:05 AM, Gorden [SMTP:gorden AT ms9 DOT url DOT com DOT tw]
wrote:
| typedef struct VESA_INFO         /* VESA information block structure
| */
| { 
|    unsigned char  VESASignature[4]      __attribute__ ((packed));
|    unsigned short VESAVersion             __attribute__ ((packed));
|    unsigned long  OEMStringPtr             __attribute__ ((packed));
|    
|    unsigned char  Capabilities[4]            __attribute__
|    ((packed));
|    unsigned long  VideoModePtr            __attribute__ ((packed));
|    
|    unsigned short TotalMemory              __attribute__ ((packed));
|    
|    unsigned short OemSoftwareRev        __attribute__ ((packed)); 
|    unsigned long  OemVendorNamePtr   __attribute__ ((packed)); 
|    unsigned long  OemProductNamePtr   __attribute__ ((packed)); 
|    unsigned long  OemProductRevPtr      __attribute__ ((packed)); 
|    unsigned char  Reserved[222]             __attribute__
|    ((packed)); 
|    unsigned char  OemData[256]             __attribute__ ((packed));
|    
| } VESA_INFO;
| 
| __attribute__ ((packed));  what's that

gccdoes something known as padding to improve the performance
of your program. However, sometimes, this padding process is
unacceptable (for example in this case). Please read the FAQ.
It has a section that describes about the
__attribute__ ((packed)) feature.

Prashant
--------------------------------------------------------------------------------
The information transmitted is intended only for the person or entity to which 
it is addressed and may contain confidential and/or privileged material. 
Any review, retransmission, dissemination or other use of, or taking of any 
action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. 
If you received this in error, please contact the sender and delete the materialfrom any computer.
--------------------------------------------------------------------------------

- Raw text -


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