]> granicus.if.org Git - yasm/commitdiff
Build cleanups (mostly for warnings) for VC8.
authorPeter Johnson <peter@tortall.net>
Wed, 11 Jan 2006 05:51:32 +0000 (05:51 -0000)
committerPeter Johnson <peter@tortall.net>
Wed, 11 Jan 2006 05:51:32 +0000 (05:51 -0000)
* Mkfiles/vc8/config.h: Define _CRT_SECURE_NO_DEPRECATE to avoid most warnings about *_s functions.
Also use _stricmp directly instead of stricmp to avoid warnings.
* libyasm/strcasecmp.c: Support _stricmp usage.
* util.h: Likewise.

* tools/re2c/actions.c: Include ctype.h to define toupper/tolower.

* Mkfiles/vc8/modules/modules.vcproj: Don't include nasm-macros.c directly; this file is included
into another file and has no public variables.

* Mkfiles/vc8/yasm.sln: Allow x64 cross-builds from Win32 by building genmacro, genmodule, and
re2c for Win32 target.

svn path=/trunk/yasm/; revision=1328

Mkfiles/vc8/config.h
Mkfiles/vc8/modules/modules.vcproj
Mkfiles/vc8/yasm.sln
libyasm/strcasecmp.c
tools/re2c/actions.c
util.h

index b127bc4768ede455f122f9219b1c60a167ef744c..ed266c5551eb769e7bc00b8461533f999e0f3d99 100644 (file)
@@ -1,5 +1,7 @@
 /* $Id: config.h 1137 2004-09-04 01:24:57Z peter $ */\r
 \r
+#define _CRT_SECURE_NO_DEPRECATE 1\r
+\r
 /* */\r
 /* #undef ENABLE_NLS */\r
 \r
 #define HAVE_STRCMP 1\r
 \r
 /* Define if you have the `strcmpi' function. */\r
-#define HAVE_STRCMPI 1\r
-#define strcmpi _strcmpi\r
+/* #undef HAVE_STRCMPI */\r
 \r
 /* Define if you have the `strerror' function. */\r
 #define HAVE_STRERROR 1\r
 \r
 /* Define if you have the `stricmp' function. */\r
-#define HAVE_STRICMP 1\r
-#define stricmp _stricmp\r
+#define HAVE__STRICMP 1\r
 \r
 /* Define if you have the <strings.h> header file. */\r
 /* #undef HAVE_STRINGS_H */\r
index 9bbc8999a5dace6a21a0c00b9b9743775f690172..f11b7e0b476ec9653393e686abd0c9bf428ef5af 100644 (file)
                                                RelativePath="..\..\..\modules\preprocs\nasm\nasm-eval.h"\r
                                                >\r
                                        </File>\r
-                                       <File\r
-                                               RelativePath="..\..\..\nasm-macros.c"\r
-                                               >\r
-                                       </File>\r
                                        <File\r
                                                RelativePath="..\..\..\modules\preprocs\nasm\nasm-pp.c"\r
                                                >\r
index 29cdb84fd42cae24da606a93a811d8c3328e54f6..6fb44f4d619d01df74d43ff6e236854c1209beaf 100644 (file)
@@ -63,27 +63,28 @@ Global
                {34EB1BEB-C2D6-4A52-82B7-7ACD714A30D5}.Release|x64.Build.0 = Release|x64\r
                {225700A5-07B8-434E-AD61-555278BF6733}.Debug|Win32.ActiveCfg = Debug|Win32\r
                {225700A5-07B8-434E-AD61-555278BF6733}.Debug|Win32.Build.0 = Debug|Win32\r
-               {225700A5-07B8-434E-AD61-555278BF6733}.Debug|x64.ActiveCfg = Debug|x64\r
-               {225700A5-07B8-434E-AD61-555278BF6733}.Debug|x64.Build.0 = Debug|x64\r
+               {225700A5-07B8-434E-AD61-555278BF6733}.Debug|x64.ActiveCfg = Debug|Win32\r
+               {225700A5-07B8-434E-AD61-555278BF6733}.Debug|x64.Build.0 = Debug|Win32\r
                {225700A5-07B8-434E-AD61-555278BF6733}.Release|Win32.ActiveCfg = Release|Win32\r
                {225700A5-07B8-434E-AD61-555278BF6733}.Release|Win32.Build.0 = Release|Win32\r
-               {225700A5-07B8-434E-AD61-555278BF6733}.Release|x64.ActiveCfg = Release|x64\r
-               {225700A5-07B8-434E-AD61-555278BF6733}.Release|x64.Build.0 = Release|x64\r
+               {225700A5-07B8-434E-AD61-555278BF6733}.Release|x64.ActiveCfg = Release|Win32\r
+               {225700A5-07B8-434E-AD61-555278BF6733}.Release|x64.Build.0 = Release|Win32\r
                {3C58BE13-50A3-4583-984D-D8902B3D7713}.Debug|Win32.ActiveCfg = Debug|Win32\r
                {3C58BE13-50A3-4583-984D-D8902B3D7713}.Debug|Win32.Build.0 = Debug|Win32\r
-               {3C58BE13-50A3-4583-984D-D8902B3D7713}.Debug|x64.ActiveCfg = Debug|x64\r
-               {3C58BE13-50A3-4583-984D-D8902B3D7713}.Debug|x64.Build.0 = Debug|x64\r
+               {3C58BE13-50A3-4583-984D-D8902B3D7713}.Debug|x64.ActiveCfg = Debug|Win32\r
+               {3C58BE13-50A3-4583-984D-D8902B3D7713}.Debug|x64.Build.0 = Debug|Win32\r
                {3C58BE13-50A3-4583-984D-D8902B3D7713}.Release|Win32.ActiveCfg = Release|Win32\r
                {3C58BE13-50A3-4583-984D-D8902B3D7713}.Release|Win32.Build.0 = Release|Win32\r
-               {3C58BE13-50A3-4583-984D-D8902B3D7713}.Release|x64.ActiveCfg = Release|x64\r
-               {3C58BE13-50A3-4583-984D-D8902B3D7713}.Release|x64.Build.0 = Release|x64\r
+               {3C58BE13-50A3-4583-984D-D8902B3D7713}.Release|x64.ActiveCfg = Release|Win32\r
+               {3C58BE13-50A3-4583-984D-D8902B3D7713}.Release|x64.Build.0 = Release|Win32\r
                {F0E8B707-00C5-4FF2-B8EF-7C39817132A0}.Debug|Win32.ActiveCfg = Debug|Win32\r
                {F0E8B707-00C5-4FF2-B8EF-7C39817132A0}.Debug|Win32.Build.0 = Debug|Win32\r
                {F0E8B707-00C5-4FF2-B8EF-7C39817132A0}.Debug|x64.ActiveCfg = Debug|Win32\r
+               {F0E8B707-00C5-4FF2-B8EF-7C39817132A0}.Debug|x64.Build.0 = Debug|Win32\r
                {F0E8B707-00C5-4FF2-B8EF-7C39817132A0}.Release|Win32.ActiveCfg = Release|Win32\r
                {F0E8B707-00C5-4FF2-B8EF-7C39817132A0}.Release|Win32.Build.0 = Release|Win32\r
-               {F0E8B707-00C5-4FF2-B8EF-7C39817132A0}.Release|x64.ActiveCfg = Release|x64\r
-               {F0E8B707-00C5-4FF2-B8EF-7C39817132A0}.Release|x64.Build.0 = Release|x64\r
+               {F0E8B707-00C5-4FF2-B8EF-7C39817132A0}.Release|x64.ActiveCfg = Release|Win32\r
+               {F0E8B707-00C5-4FF2-B8EF-7C39817132A0}.Release|x64.Build.0 = Release|Win32\r
        EndGlobalSection\r
        GlobalSection(SolutionProperties) = preSolution\r
                HideSolutionNode = FALSE\r
index 32a914fce71ab4d8dc93930b2de255bf6655d8de..441d0456f60fba6aa77082779bf89cf9ab2e6f0c 100644 (file)
@@ -52,6 +52,8 @@ yasm__strcasecmp(const char *s1, const char *s2)
     return strcasecmp(s1, s2);
 #elif HAVE_STRICMP
     return stricmp(s1, s2);
+#elif HAVE__STRICMP
+    return _stricmp(s1, s2);
 #elif HAVE_STRCMPI
     return strcmpi(s1, s2);
 #else
@@ -73,6 +75,8 @@ yasm__strncasecmp(const char *s1, const char *s2, size_t n)
     return strncasecmp(s1, s2, n);
 #elif HAVE_STRICMP
     return strnicmp(s1, s2, n);
+#elif HAVE__STRNICMP
+    return _strnicmp(s1, s2, n);
 #elif HAVE_STRCMPI
     return strncmpi(s1, s2, n);
 #else
index 578291abcb4f7aff86a0e0a96b33e91d8288065b..3eaade00a4390a5cf39b02974868dee12e4becd2 100644 (file)
@@ -1,6 +1,7 @@
 #include <time.h>
 #include <string.h>
 #include <stdio.h>
+#include <ctype.h>
 
 #include "tools/re2c/globals.h"
 #include "tools/re2c/parse.h"
diff --git a/util.h b/util.h
index 5e0db54a0469d0aa3b4a56978fa9e40e560d0704..6a9ebddc304b380628ce152cd5b6b4faafd08f85 100644 (file)
--- a/util.h
+++ b/util.h
 #elif HAVE_STRICMP
 # define yasm__strcasecmp(x, y)                stricmp(x, y)
 # define yasm__strncasecmp(x, y, n)    strnicmp(x, y, n)
+#elif HAVE__STRICMP
+# define yasm__strcasecmp(x, y)                _stricmp(x, y)
+# define yasm__strncasecmp(x, y, n)    _strnicmp(x, y, n)
 #elif HAVE_STRCMPI
 # define yasm__strcasecmp(x, y)                strcmpi(x, y)
 # define yasm__strncasecmp(x, y, n)    strncmpi(x, y, n)