From 2a44200d60a3ee1c749582b478ae3b72a81bc76d Mon Sep 17 00:00:00 2001 From: Peter Johnson Date: Wed, 18 Jan 2006 01:51:08 +0000 Subject: [PATCH] * yasm.c (opt_objfmt_handler): Lowercase the objfmt keyword. This forces the __YASM_OBJFMT__ value to always be lowercase, e.g. for "-f Win32" on the command line, __YASM_OBJFMT__ becomes "win32". Requested by: Brian Gladman svn path=/trunk/yasm/; revision=1337 --- frontends/yasm/yasm.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/frontends/yasm/yasm.c b/frontends/yasm/yasm.c index ceced82a..ed93c767 100644 --- a/frontends/yasm/yasm.c +++ b/frontends/yasm/yasm.c @@ -27,6 +27,7 @@ #include /*@unused@*/ RCSID("$Id$"); +#include #include #include #include @@ -850,6 +851,7 @@ opt_preproc_handler(/*@unused@*/ char *cmd, char *param, /*@unused@*/ int extra) static int opt_objfmt_handler(/*@unused@*/ char *cmd, char *param, /*@unused@*/ int extra) { + size_t i; assert(param != NULL); cur_objfmt_module = yasm_load_objfmt(param); if (!cur_objfmt_module) { @@ -866,6 +868,8 @@ opt_objfmt_handler(/*@unused@*/ char *cmd, char *param, /*@unused@*/ int extra) if (objfmt_keyword) yasm_xfree(objfmt_keyword); objfmt_keyword = yasm__xstrdup(param); + for (i=0; i