summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStanislav Karchebny <berkus@users.sourceforge.net>2003-09-25 11:43:28 +0000
committerStanislav Karchebny <berkus@users.sourceforge.net>2003-09-25 11:43:28 +0000
commitd52236c00efb0d198b71d1ac6e83182095563f4a (patch)
tree5e1eb711136d3e7556905630543029bc44072883
parent5e8f36611f0d2543aa4f2cb5da02892b83c6994a (diff)
downloadnasm-d52236c00efb0d198b71d1ac6e83182095563f4a.tar.gz
Revert erroneous macro added and modify __OUTPUT_FORMAT__ to a string const
-rw-r--r--CHANGES5
-rw-r--r--nasm.c2
-rw-r--r--output/outaout.c1
-rw-r--r--output/outas86.c1
-rw-r--r--output/outbin.c1
-rw-r--r--output/outcoff.c1
-rw-r--r--output/outelf.c1
-rw-r--r--output/outobj.c1
-rw-r--r--output/outrdf.c1
-rw-r--r--output/outrdf2.c1
-rw-r--r--test/nasmformat.asm4
11 files changed, 4 insertions, 15 deletions
diff --git a/CHANGES b/CHANGES
index f05b6ce3..be8e10fe 100644
--- a/CHANGES
+++ b/CHANGES
@@ -3,10 +3,7 @@
* "make spotless" no longer deletes config.h.in.
* Unterminated string auto termination.
* %(el)if(n)idn insensitivity to string quotes difference (#809300).
-* __NASM_FORMAT__ now gives output format chosen for compiling.
- See test/nasmformat.asm for details and output/out*.c for actual values
- for this macro.
- !!NEEDS DOCUMENTING!!
+* (nasm.c) __OUTPUT_FORMAT__ changed to string value instead of symbol.
0.98.38
-------
diff --git a/nasm.c b/nasm.c
index e6be9256..17441173 100644
--- a/nasm.c
+++ b/nasm.c
@@ -185,7 +185,7 @@ int main(int argc, char **argv)
/* define some macros dependent of command-line */
{
char temp [64];
- sprintf (temp, "__OUTPUT_FORMAT__=%s\n", ofmt->shortname);
+ sprintf (temp, "__OUTPUT_FORMAT__='%s'\n", ofmt->shortname);
pp_pre_define (temp);
}
diff --git a/output/outaout.c b/output/outaout.c
index 18746e37..24e2b581 100644
--- a/output/outaout.c
+++ b/output/outaout.c
@@ -877,7 +877,6 @@ static void aout_filename (char *inname, char *outname, efunc error)
static const char *aout_stdmac[] = {
"%define __SECT__ [section .text]",
- "%define __NASM_FORMAT__ 'aout'",
"%macro __NASM_CDecl__ 1",
"%endmacro",
NULL
diff --git a/output/outas86.c b/output/outas86.c
index ccf87e7f..3026ad9e 100644
--- a/output/outas86.c
+++ b/output/outas86.c
@@ -555,7 +555,6 @@ static void as86_filename (char *inname, char *outname, efunc error)
static const char *as86_stdmac[] = {
"%define __SECT__ [section .text]",
- "%define __NASM_FORMAT__ 'as86'",
"%macro __NASM_CDecl__ 1",
"%endmacro",
NULL
diff --git a/output/outbin.c b/output/outbin.c
index 3f63d4ce..80be83cf 100644
--- a/output/outbin.c
+++ b/output/outbin.c
@@ -137,7 +137,6 @@ static char *infile, *outfile;
static const char *bin_stdmac[] = {
"%define __SECT__ [section .text]",
- "%define __NASM_FORMAT__ 'bin'",
"%imacro org 1+.nolist",
"[org %1]",
"%endmacro",
diff --git a/output/outcoff.c b/output/outcoff.c
index bd0202f2..856da58e 100644
--- a/output/outcoff.c
+++ b/output/outcoff.c
@@ -820,7 +820,6 @@ static void coff_win32_filename (char *inname, char *outname, efunc error)
static const char *coff_stdmac[] = {
"%define __SECT__ [section .text]",
- "%define __NASM_FORMAT__ 'coff'",
"%macro __NASM_CDecl__ 1",
"%endmacro",
"%imacro export 1+.nolist",
diff --git a/output/outelf.c b/output/outelf.c
index bff9405d..16c25d10 100644
--- a/output/outelf.c
+++ b/output/outelf.c
@@ -1225,7 +1225,6 @@ static void elf_filename (char *inname, char *outname, efunc error)
static const char *elf_stdmac[] = {
"%define __SECT__ [section .text]",
- "%define __NASM_FORMAT__ 'elf'",
"%macro __NASM_CDecl__ 1",
"%define $_%1 $%1",
"%endmacro",
diff --git a/output/outobj.c b/output/outobj.c
index a3eed140..14b6cd9c 100644
--- a/output/outobj.c
+++ b/output/outobj.c
@@ -2285,7 +2285,6 @@ void obj_fwrite(ObjRecord *orp)
static const char *obj_stdmac[] = {
"%define __SECT__ [section .text]",
- "%define __NASM_FORMAT__ 'obj'",
"%imacro group 1+.nolist",
"[group %1]",
"%endmacro",
diff --git a/output/outrdf.c b/output/outrdf.c
index 32e63bca..d9989e52 100644
--- a/output/outrdf.c
+++ b/output/outrdf.c
@@ -501,7 +501,6 @@ static void rdf_filename (char *inname, char *outname, efunc error) {
static char *rdf_stdmac[] = {
"%define __SECT__ [section .text]",
- "%define __NASM_FORMAT__ 'oldrdf'", /* Its always oldrdf for consistency with rdf version 2 */
"%imacro library 1+.nolist",
"[library %1]",
"%endmacro",
diff --git a/output/outrdf2.c b/output/outrdf2.c
index 3c69e0a3..1dfef93f 100644
--- a/output/outrdf2.c
+++ b/output/outrdf2.c
@@ -753,7 +753,6 @@ static void rdf2_filename (char *inname, char *outname, efunc error) {
static const char *rdf2_stdmac[] = {
"%define __SECT__ [section .text]",
- "%define __NASM_FORMAT__ 'rdf'",
"%imacro library 1+.nolist",
"[library %1]",
"%endmacro",
diff --git a/test/nasmformat.asm b/test/nasmformat.asm
index 82d61c15..5b4dc25e 100644
--- a/test/nasmformat.asm
+++ b/test/nasmformat.asm
@@ -1,9 +1,9 @@
-%if __NASM_FORMAT__ == 'bin'
+%if __OUTPUT_FORMAT__ == 'bin'
db 'This is binary format file'
-%elif __NASM_FORMAT__ == 'obj'
+%elif __OUTPUT_FORMAT__ == 'obj'
db 'This is object format file'