]> git.ipfire.org Git - thirdparty/krb5.git/commitdiff
Build with Visual Studio 2012
authorBen Kaduk <kaduk@mit.edu>
Mon, 24 Jun 2013 22:19:45 +0000 (18:19 -0400)
committerBen Kaduk <kaduk@mit.edu>
Tue, 25 Jun 2013 21:07:13 +0000 (17:07 -0400)
It's more aggressive about enforcing that keywords are not macros
in C++ mode, and has bumped the MFC version to 11.

Keep compatibility with older versions of Visual Studio, appropriately
conditionalized.

ticket: 7664 (new)
tags: pullup
target_version: 1.11.4

src/include/win-mac.h
src/windows/leash/Makefile.in

index daec295b2c9b3e56d186377c17655807479f6057..2d8090adbf62921dc1fe34893efeaad342f185bf 100644 (file)
@@ -119,8 +119,10 @@ typedef _W64 int         ssize_t;
 #define NO_PASSWORD
 #define HAVE_STRERROR
 #define SYS_ERRLIST_DECLARED
-/* if __STDC_VERSION__ >= 199901L this shouldn't be needed */
+/* Visual Studio 2012 errors out when we macroize keywords in C++ mode */
+#ifndef __cplusplus
 #define inline __inline
+#endif
 #define NEED_INSIXADDR_ANY
 #define ENABLE_THREADS
 #endif
index ec8cfa0d7b799c681320e4ad96502b6d1fa3b495..28815f0001c85ae3d88ace3c920872444695409f 100644 (file)
@@ -14,11 +14,20 @@ AFS_INCLUDES=
 AFS_LIBS=
 !endif
 
+# Need MFC version 11 for VS 2012; older VS get MFC version 10
+!if defined(VISUALSTUDIOVERSION) && "$(VISUALSTUDIOVERSION)" == "11.0"
+!if defined(NODEBUG)
+MFCLIB=MFC110.LIB
+!else
+MFCLIB=MFC110D.LIB
+!endif
+!else
 !if defined(NODEBUG)
 MFCLIB=MFC100.LIB
 !else
 MFCLIB=MFC100D.LIB
 !endif
+!endif
 EXE_NAME=leash
 WSHELPER=wshelp32