[vlc-commits] NSIS/nsProcess: Update nsis_tchar.h

Marvin Scholz git at videolan.org
Wed Nov 15 01:46:18 CET 2017


vlc | branch: master | Marvin Scholz <epirat07 at gmail.com> | Wed Nov 15 01:10:56 2017 +0100| [7e73bd4af9e7ad4cad1fac7cb49971fe782687dd] | committer: Marvin Scholz

NSIS/nsProcess: Update nsis_tchar.h

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=7e73bd4af9e7ad4cad1fac7cb49971fe782687dd
---

 extras/package/win32/NSIS/nsProcess/nsis_tchar.h | 35 +++++++++++++++++-------
 1 file changed, 25 insertions(+), 10 deletions(-)

diff --git a/extras/package/win32/NSIS/nsProcess/nsis_tchar.h b/extras/package/win32/NSIS/nsProcess/nsis_tchar.h
index 92025ccc5e..7b99f3cb27 100644
--- a/extras/package/win32/NSIS/nsProcess/nsis_tchar.h
+++ b/extras/package/win32/NSIS/nsProcess/nsis_tchar.h
@@ -3,7 +3,7 @@
  * 
  * This file is a part of NSIS.
  * 
- * Copyright (C) 1999-2007 Nullsoft and Contributors
+ * Copyright (C) 1999-2017 Nullsoft and Contributors
  * 
  * This software is provided 'as-is', without any express or implied
  * warranty.
@@ -22,23 +22,37 @@
 #define _T(x)    __T(x)
 #define _TEXT(x) __T(x)
 #endif
+
+#ifndef _TCHAR_DEFINED
+#define _TCHAR_DEFINED
+#if !defined(_NATIVE_WCHAR_T_DEFINED) && !defined(_WCHAR_T_DEFINED)
+typedef unsigned short TCHAR;
+#else
 typedef wchar_t TCHAR;
-typedef wchar_t _TUCHAR;
+#endif
+#endif
+
 
 // program
-#define _tmain      wmain
-#define _tWinMain   wWinMain
 #define _tenviron   _wenviron
 #define __targv     __wargv
 
 // printfs
 #define _ftprintf   fwprintf
 #define _sntprintf  _snwprintf
-#define _stprintf   _swprintf
+#if (defined(_MSC_VER) && (_MSC_VER<=1310||_MSC_FULL_VER<=140040310)) || defined(__MINGW32__)
+#   define _stprintf   swprintf
+#else
+#   define _stprintf   _swprintf
+#endif
 #define _tprintf    wprintf
 #define _vftprintf  vfwprintf
 #define _vsntprintf _vsnwprintf
-#define _vstprintf  _vswprintf
+#if defined(_MSC_VER) && (_MSC_VER<=1310)
+#   define _vstprintf  vswprintf
+#else
+#   define _vstprintf  _vswprintf
+#endif
 
 // scanfs
 #define _tscanf     wscanf
@@ -115,12 +129,13 @@ typedef wchar_t _TUCHAR;
 #define _T(x)    x
 #define _TEXT(x) x
 #endif
-typedef char            TCHAR;
-typedef unsigned char   _TUCHAR;
+
+#ifndef _TCHAR_DEFINED
+#define _TCHAR_DEFINED
+typedef char TCHAR;
+#endif
 
 // program
-#define _tmain      main
-#define _tWinMain   WinMain
 #define _tenviron   environ
 #define __targv     __argv
 



More information about the vlc-commits mailing list