diff options
author | H. Peter Anvin <hpa@zytor.com> | 2003-09-06 00:50:27 +0000 |
---|---|---|
committer | H. Peter Anvin <hpa@zytor.com> | 2003-09-06 00:50:27 +0000 |
commit | 61ecdbb3a814c42dc5730532b604280efaea3047 (patch) | |
tree | db1ed2cc577ae8c1a6b54ab39a8d71cf7d3f458d /nasmlib.h | |
parent | 4b2900af2d6bd73716ea7bd8009e02be70d48524 (diff) | |
download | nasm-61ecdbb3a814c42dc5730532b604280efaea3047.tar.gz nasm-61ecdbb3a814c42dc5730532b604280efaea3047.tar.bz2 nasm-61ecdbb3a814c42dc5730532b604280efaea3047.zip |
First attempt at fixing the stabs/ELF issue.
Diffstat (limited to 'nasmlib.h')
-rw-r--r-- | nasmlib.h | 17 |
1 files changed, 11 insertions, 6 deletions
@@ -107,18 +107,23 @@ void standard_extension (char *inname, char *outname, char *extension, * format in memory */ -#define WRITELONG(p,v) \ +#define WRITECHAR(p,v) \ do { \ *(p)++ = (v) & 0xFF; \ - *(p)++ = ((v) >> 8) & 0xFF; \ - *(p)++ = ((v) >> 16) & 0xFF; \ - *(p)++ = ((v) >> 24) & 0xFF; \ } while (0) #define WRITESHORT(p,v) \ do { \ - *(p)++ = (v) & 0xFF; \ - *(p)++ = ((v) >> 8) & 0xFF; \ + WRITECHAR(p,v); \ + WRITECHAR(p,(v) >> 8); \ + } while (0) + +#define WRITELONG(p,v) \ + do { \ + WRITECHAR(p,v); \ + WRITECHAR(p,(v) >> 8); \ + WRITECHAR(p,(v) >> 16); \ + WRITECHAR(p,(v) >> 24); \ } while (0) /* |