From 62e998a88bce070f6ca491b0057de05028102bb7 Mon Sep 17 00:00:00 2001 From: Steven Edwards Date: Fri, 22 Aug 2003 23:34:30 +0000 Subject: [PATCH] Wine porting fixes Patch by Filip Navara svn path=/trunk/; revision=5776 --- reactos/include/wine/debug.h | 1 + reactos/include/wine/debugtools.h | 6 ++ reactos/include/wine/port.h | 32 ++------- reactos/include/wine/unicode.h | 15 +++++ reactos/include/wine/wine_common_ver.rc | 86 +++++++++++++++++++++++++ 5 files changed, 113 insertions(+), 27 deletions(-) create mode 100644 reactos/include/wine/debug.h create mode 100644 reactos/include/wine/unicode.h create mode 100644 reactos/include/wine/wine_common_ver.rc diff --git a/reactos/include/wine/debug.h b/reactos/include/wine/debug.h new file mode 100644 index 00000000000..64793172998 --- /dev/null +++ b/reactos/include/wine/debug.h @@ -0,0 +1 @@ +#include "debugtools.h" diff --git a/reactos/include/wine/debugtools.h b/reactos/include/wine/debugtools.h index a1146a8c66e..242df8dbd6e 100644 --- a/reactos/include/wine/debugtools.h +++ b/reactos/include/wine/debugtools.h @@ -108,6 +108,12 @@ inline static const char *debugres_w( const WCHAR *s ) { return wine_dbgstr_wn( #define DEFAULT_DEBUG_CHANNEL(ch) \ char __wine_dbch_##ch[1]; static char * const __wine_dbch___default = __wine_dbch_##ch +#define WINE_DEFAULT_DEBUG_CHANNEL(ch) DEFAULT_DEBUG_CHANNEL(ch) + +#define WINE_DEFAULT_DEBUG_CHANNEL(ch) DEFAULT_DEBUG_CHANNEL(ch) + +#define WINE_DEFAULT_DEBUG_CHANNEL(ch) DEFAULT_DEBUG_CHANNEL(ch) + #define DPRINTF wine_dbg_printf #define MESSAGE wine_dbg_printf diff --git a/reactos/include/wine/port.h b/reactos/include/wine/port.h index 9ad3902659b..2a768578524 100644 --- a/reactos/include/wine/port.h +++ b/reactos/include/wine/port.h @@ -6,36 +6,14 @@ #ifndef _ROS_WINE_PORT #define _ROS_WINE_PORT +typedef short INT16; #define HFILE_ERROR ((HFILE)-1) /* Already in winbase.h - ros is fubar */ +#define strncasecmp strncmp +#define snprintf _snprintf +#define strcasecmp _stricmp /* Wine debugging porting */ - -#define TRACE DbgPrint -#define TRACE_(ch) DbgPrint -#define TRACE_ON(ch) DbgPrint - -#define WARN DbgPrint -#define WARN_(ch) DbgPrint -#define WARN_ON(ch) DbgPrint - -#define FIXME DbgPrint -#define FIXME_(ch) DbgPrint -#define FIXME_ON(ch) DbgPrint - -#undef ERR /* Solaris got an 'ERR' define in */ -#define ERR DbgPrint -#define ERR_(ch) DbgPrint -#define ERR_ON(ch) DbgPrint - - -/* some useful string manipulation routines */ - -static inline unsigned int strlenW( const WCHAR *str ) -{ - const WCHAR *s = str; - while (*s) s++; - return s - str; -} +#include "debugtools.h" #endif /* _ROS_WINE_PORT */ diff --git a/reactos/include/wine/unicode.h b/reactos/include/wine/unicode.h new file mode 100644 index 00000000000..095195f02a3 --- /dev/null +++ b/reactos/include/wine/unicode.h @@ -0,0 +1,15 @@ +#ifndef _WINE_UNICODE_H +#define _WINE_UNICODE_H + +#define strlenW(s) wcslen((const wchar_t *)s) +#define strcpyW(d,s) wcscpy((wchar_t *)d,(const wchar_t *)s) +#define strcatW(d,s) wcscat((wchar_t *)d,(const wchar_t *)s) +#define strstrW(d,s) wcsstr((const wchar_t *)d,(const wchar_t *)s) +#define strtolW(s,e,b) wcstol((const wchar_t *)s,(wchar_t **)e,b) +#define strchrW(s,c) wcschr((const wchar_t *)s,(wchar_t)c) +#define strncmpW(s1,s2,n) wcsncmp((const wchar_t *)s1,(const wchar_t *)s2,n) +#define tolowerW(n) towlower((wint_t)n) +#define atoiW(s) _wtoi((const wchar_t *)s) +#define atolW(s) _wtol((const wchar_t *)s) + +#endif diff --git a/reactos/include/wine/wine_common_ver.rc b/reactos/include/wine/wine_common_ver.rc new file mode 100644 index 00000000000..5bb6ad85a6e --- /dev/null +++ b/reactos/include/wine/wine_common_ver.rc @@ -0,0 +1,86 @@ +/* + * Copyright 2001 Dmitry Timoshkov + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include "winver.h" + +/* +Assign WINE_FILEVERSION and WINE_FILEVERSION_STR high enough number +to make sure that programs, relying on the version numbers, will +never complain. +*/ + +#ifndef WINE_FILEVERSION +#define WINE_FILEVERSION 10,0,0,0 +#endif + +#ifndef WINE_FILEVERSION_STR +#define WINE_FILEVERSION_STR "10.0" +#endif + +#ifndef WINE_FILEDESCRIPTION_STR +#define WINE_FILEDESCRIPTION_STR "Wine core dll" +#endif + +#ifndef WINE_FILENAME_STR +#define WINE_FILENAME_STR "" +#endif + +#ifndef WINE_PRODUCTVERSION +#define WINE_PRODUCTVERSION 1,0,0,0 +#endif + +#ifndef WINE_PRODUCTVERSION_STR +#define WINE_PRODUCTVERSION_STR "1.0" +#endif + +#ifndef WINE_PRODUCTNAME_STR +#define WINE_PRODUCTNAME_STR "Wine" +#endif + +VS_VERSION_INFO VERSIONINFO +FILEVERSION WINE_FILEVERSION +PRODUCTVERSION WINE_PRODUCTVERSION +FILEFLAGSMASK 0 +FILEFLAGS 0 +FILEOS VOS_UNKNOWN +FILETYPE VFT_DLL +FILESUBTYPE VFT2_UNKNOWN +{ + BLOCK "StringFileInfo" + { + BLOCK "040904E4" /* LANG_ENGLISH/SUBLANG_DEFAULT, CP 1252 */ + { + VALUE "CompanyName", "Wine Team" + VALUE "FileDescription", WINE_FILEDESCRIPTION_STR + VALUE "FileVersion", WINE_FILEVERSION_STR + VALUE "InternalName", WINE_FILENAME_STR + VALUE "LegalCopyright", "Copyright (c) 1993-2001 the Wine project authors " \ + "(see the file AUTHORS for a complete list)" + VALUE "OriginalFilename", WINE_FILENAME_STR + VALUE "ProductName", WINE_PRODUCTNAME_STR + VALUE "ProductVersion", WINE_PRODUCTVERSION_STR +#ifdef WINE_OLESELFREGISTER + VALUE "OLESelfRegister", "" +#endif + } + } + BLOCK "VarFileInfo" + { + VALUE "Translation", 0x0409, 0x04E4 /* LANG_ENGLISH/SUBLANG_DEFAULT, CP 1252 */ + } +}