![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| High Level Programming Post questions about C, C++, Java, SQL, and other programming languages here. |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| If the AIX need reboot after install fix pack or APAR? | rainbow_bean | AIX | 3 | 01-05-2008 03:51 AM |
| Pack current folder | WebWatch | UNIX for Dummies Questions & Answers | 3 | 12-17-2007 02:46 AM |
| Aix - Service Pack | BabylonRocker | AIX | 1 | 10-18-2006 01:54 AM |
| Perl help!! (pack()?) | Euler04 | Shell Programming and Scripting | 2 | 10-18-2005 07:58 AM |
| HP-UX UNIX Software v.10.20 Pack | normreeves | UNIX for Dummies Questions & Answers | 1 | 01-07-2002 10:59 AM |
|
|
Submit Tools | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
hello.
i use follow sentences in include files in SCO unix is ok. #pragma pack(1) struct dddd { int iD1; char cCh1; ... }; #pragma pack() but in hp-9000 unix , not ok when compiling, cc not support #pragma pack(1) how to settle the question ? thank you . |
| Forum Sponsor | ||
|
|
|
#2
|
||||
|
||||
|
A "#pragma" by definition is implementation defined. A compiler is supposed to ignore a pragma that it doesn't understand. HP's c compiler does issue a warning, but it should compile.
I'm not familiar with the pragma that you are using. But I'll make a guess as to its function. It looks like your system has a choice of two ways to compile a structure. I would guess that one choice conserves memory while the other choice enhances execution speed. You won't get a choice like that on HP systems. HP's chip is designed for execution speed. But it has very strict memory alignment constraints. And so HP's compiler doesn't get a choice. Ignore the warning or remove the pragma. If your program assumes a particular internal layout of a structure then it is not a portable program and you will probably have trouble. |
||||
| Google The UNIX and Linux Forums |