diff options
author | Guy Harris <guy@alum.mit.edu> | 1999-05-10 20:17:36 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 1999-05-10 20:17:36 +0000 |
commit | 0562b3cd20b6b98c25c564203880ed5478b2ea23 (patch) | |
tree | 5ef8198ec89f75b0db31cb2bbb82c65e525f9c82 /alignment.h | |
parent | 36609cd91ec983bd677730280a37315a50b8dbe0 (diff) |
Get rid of the "P*" macros, as we're not using them (Ethereal only reads
packets, it doesn't store into them), and make the "G*" macros use
"pletohs()" and "pletohl()", making them platform-independent.
svn path=/trunk/; revision=265
Diffstat (limited to 'alignment.h')
-rw-r--r-- | alignment.h | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/alignment.h b/alignment.h index e585f515e7..5ed673fa95 100644 --- a/alignment.h +++ b/alignment.h @@ -18,19 +18,10 @@ #ifndef __ALIGNMENT_H #define __ALIGNMENT_H -#ifdef __i386__ #define GBYTE(buf, pos) (unsigned char)((char)buf[pos]) -#define PBYTE(buf, pos, val) GBYTE(buf, pos) = (unsigned char)(val) -#define GSHORT(buf, pos) ((unsigned short *)((buf) + pos))[0] -#define PSHORT(buf, pos, val) GSHORT(buf, pos) = (unsigned short)(val) -#define GSSHORT(buf, pos) ((signed short *)((buf) + pos))[0] +#define GSHORT(buf, pos) pletohs(&buf[pos]) +#define GSSHORT(buf, pos) (signed)pletohs(&buf[pos]) +#define GWORD(buf, pos) pletohl(&buf[pos]) -#define GWORD(buf, pos) ((unsigned int *)((buf) + pos))[0] -#define PWORD(buf, pos, val) GWORD(buf, pos) = (unsigned int)(val) - -#else - - -#endif #endif |