Sponsored Content
Top Forums Programming Padding issues between Sparc and Intel Post 302543475 by Goseib on Monday 1st of August 2011 01:12:07 AM
Old 08-01-2011
Padding issues between Sparc and Intel

Hello,
I'm facing structure padding issues when my Solaris 32-bit C/C++ application that runs on Sparc communicates with the same C/C++ application that runs on 32-bit Intel. I know that Sparc and Intel use different padding patterns. So when it comes to reading the exchanged structure data, both machines read the wrong data.

My structure is of the form:
Code:
typedef struct {
  uint8_t a;
  uint8_t b;
  uint16_t c;
  uint32_t d;
  uint64_t e;
  struct {
      uint64_t f;
      uint32_t g;
  } inner_struct;
  uint32_t h;
  uint32_t i;
  uint16_t j;
  uint16_t k;
  uint64_t l;
} outter_struct;

Is there a way to resolve this padding issue?

Thanx in advance.

Moderator's Comments:
Mod Comment Moved into previous post

Last edited by pludi; 08-01-2011 at 04:10 AM..
 

8 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Sparc vs Intel performance

Hello all, I have been trying to find any data that states what platform would garner better overall performance in an Oracle Cluster. The scenario: This is a high traffic e-commerce site with IIS and Commerce server on the front end. The backend consists of a Sun Solaris hardware/software... (7 Replies)
Discussion started by: kmgrady01
7 Replies

2. UNIX for Advanced & Expert Users

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 (2 Replies)
Discussion started by: informshilpa
2 Replies

3. UNIX for Dummies Questions & Answers

Padding

Hi Can anyone tell me how to pad zeroes on the left side to a numeric string in unix shell scripting Your answer is very much appreciated Thanks Vijay (2 Replies)
Discussion started by: vijaygopalsk
2 Replies

4. UNIX for Dummies Questions & Answers

Zero padding dates

I have a file with records containing dates like: SMPBR|DUP-DO NOT USE|NEW YORK||16105|BA5270715|2007-6-6|MWERNER|109||||JOHN||SMITH|MD|72211118||||||74559|21 WILMINGTON RD||D|2003-11-6|SL# MD CONTACT-LIZ RICHARDS|||0|Y|N||1411458| How can I get the date fields in each of my records to be... (1 Reply)
Discussion started by: ChicagoBlues
1 Replies

5. Shell Programming and Scripting

fixed length text file padding issues in AIX

Hi, I have a fixed length text file that needs to be cut into individual files in aix and facing padding issues. If I have multiple blank spaces in the file it is just making it one while cutting the files.. Eg:- $ - blank space filename:file.txt ... (2 Replies)
Discussion started by: techmoris
2 Replies

6. UNIX for Dummies Questions & Answers

can I emulate solaris/sparc on virtualbox? Or other emulator to run solaris for sparc in my win7 PC?

Hi Gurus can I emulate solaris/sparc on virtualbox? Or other emulator to run solaris for sparc in my win7 PC? regards, Israel. (9 Replies)
Discussion started by: iga3725
9 Replies

7. Ubuntu

Sudo issues with Ubuntu 7.10 Running on a Ultra SPARC Machine

I have a Sun Blade 1000 machine that I installed Ubuntu 7.10 SPARC onto. The only user configured (configure during install) cannot use sudo. When I try to issue a command using sudo (ex. sudo apt-get install) it asks me for my password and returns the error "user not found in sudoers file". I need... (4 Replies)
Discussion started by: swilso
4 Replies

8. Solaris

Running Solaris SPARC on Intel Hardware????

Hello friends, I hope everyone is fine and doing well. I want to learn Assembly language for SPARC architecture. Is there any emulator available for 64 bit SPARC on which one can install Oracle Solaris 11 SPARC version. And ofcourse on my intel laptop computer??? Thanks! (4 Replies)
Discussion started by: gabam
4 Replies
LIBMTP_allowed_values_struct(3) 				      libmtp					   LIBMTP_allowed_values_struct(3)

NAME
libmtp - LIBMTP_allowed_values_struct SYNOPSIS
#include <libmtp.h> Data Fields uint8_t u8max uint8_t u8min uint8_t u8step uint8_t * u8vals int8_t i8max int8_t i8min int8_t i8step int8_t * i8vals uint16_t u16max uint16_t u16min uint16_t u16step uint16_t * u16vals int16_t i16max int16_t i16min int16_t i16step int16_t * i16vals uint32_t u32max uint32_t u32min uint32_t u32step uint32_t * u32vals int32_t i32max int32_t i32min int32_t i32step int32_t * i32vals uint64_t u64max uint64_t u64min uint64_t u64step uint64_t * u64vals int64_t i64max int64_t i64min int64_t i64step int64_t * i64vals uint16_t num_entries LIBMTP_datatype_t datatype int is_range Detailed Description A data structure to hold allowed ranges of values Field Documentation LIBMTP_datatype_t LIBMTP_allowed_values_struct::datatype The datatype specifying which of the above is used Referenced by LIBMTP_destroy_allowed_values_t(), and LIBMTP_Get_Allowed_Property_Values(). int LIBMTP_allowed_values_struct::is_range Non zero for range, 0 for enum Referenced by LIBMTP_destroy_allowed_values_t(), and LIBMTP_Get_Allowed_Property_Values(). uint16_t LIBMTP_allowed_values_struct::num_entries Number of entries in the vals array Referenced by LIBMTP_Get_Allowed_Property_Values(). Author Generated automatically by Doxygen for libmtp from the source code. Version 1.1.3 Sun Feb 17 2013 LIBMTP_allowed_values_struct(3)
All times are GMT -4. The time now is 04:15 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy