summaryrefslogtreecommitdiff
path: root/nasmlib.h
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2003-09-06 00:50:27 +0000
committerH. Peter Anvin <hpa@zytor.com>2003-09-06 00:50:27 +0000
commit61ecdbb3a814c42dc5730532b604280efaea3047 (patch)
treedb1ed2cc577ae8c1a6b54ab39a8d71cf7d3f458d /nasmlib.h
parent4b2900af2d6bd73716ea7bd8009e02be70d48524 (diff)
downloadnasm-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.h17
1 files changed, 11 insertions, 6 deletions
diff --git a/nasmlib.h b/nasmlib.h
index 5496453..4e4eda3 100644
--- a/nasmlib.h
+++ b/nasmlib.h
@@ -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)
/*