![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| UNIX for Advanced & Expert Users Advanced UNIX and Linux questions go here. Expert-to-Expert. |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Byte Padding | naan | High Level Programming | 6 | 02-22-2007 02:09 AM |
| AWK and padding values | kshelluser | UNIX for Dummies Questions & Answers | 3 | 11-29-2006 02:14 PM |
| Padding variables | flounder | High Level Programming | 1 | 09-05-2006 09:11 AM |
| Padding | vijaygopalsk | UNIX for Dummies Questions & Answers | 2 | 06-27-2003 07:51 AM |
| Zero Padding to a string | Wing m. Cheng | High Level Programming | 3 | 09-16-2002 06:58 PM |
|
|
Submit Tools | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
Padding issues
Hello,
Structure padding & structure size are different on Compaq & HP UNIX. When structures are transfered via netfork from Compaq to HP will this be a problem? If yes, what can be the solution? Thanks, shilpa |
| Forum Sponsor | ||
|
|
|
#2
|
||||
|
||||
|
Shilpa,
What do you mean transfer structure. are you saying transfering the data structure or filesystem (kernel structure) please define your question. |
|
#3
|
|||
|
|||
|
If you are talking about stuff like this:
struct foo { int bar; char c; DEFIT honk; long snafu; }; ... struct foo *pfoo = malloc( ...); ... send_from_1_2_other(pfoo, ....); ... This is a bad idea. It will only work inside an absolutely heterogenous, eh, structure. You would want to either have a conversion routine in each end, like ntohfoo(), htonfoo() modelled after the int and long ones, or, depending on the contents, you might want to transfer in ASCII, taking performance issues into account. Atle
__________________
PS All of the above is to be read as '... unless I am wrong' ENDPS |
|||
| Google The UNIX and Linux Forums |