winegcc.diff I know I promised 4 but here is a 5th.
- include/wine/winegccdef.h (new) This is an exact replica of what winegcc is doing (extracted from winegcc.c) it is for use by people like me that cannot use winegcc directly. I hope that some day winegcc will just do: "-include wine/winegccdef.h" and save space and time. One addition I have added is an NO_NO_WARNING_MODE option that will eliminate lots off warnings. The default is warning off.
- winegcc.c needed missing stuff
Dimi what should I do with the work I have done with STLPort compiled over wine-msvcrt (dynamic or static libraries). I have not received any response from STLPort. Should I prepare a patch against the Original STLPort? where do I than send it?
Index: tools/winegcc/winegcc.c =================================================================== RCS file: /home/wine/wine/tools/winegcc/winegcc.c,v retrieving revision 1.19 diff -u -r1.19 winegcc.c --- tools/winegcc/winegcc.c 9 Mar 2004 04:49:42 -0000 1.19 +++ tools/winegcc/winegcc.c 10 Mar 2004 16:00:42 -0000 @@ -275,6 +275,7 @@ strarray_add(comp_args, "-D_cdecl=__attribute__((__cdecl__))"); strarray_add(comp_args, "-D_fastcall=__attribute__((__fastcall__))"); strarray_add(comp_args, "-D__declspec(x)=__declspec_##x"); + strarray_add(comp_args, "-D_declspec(x)=__declspec_##x"); strarray_add(comp_args, "-D__declspec_align(x)=__attribute__((aligned(x)))"); strarray_add(comp_args, "-D__declspec_allocate(x)=__attribute__((section(x)))"); strarray_add(comp_args, "-D__declspec_deprecated=__attribute__((deprecated))"); --- /dev/null 1970-01-01 02:00:00.000000000 +0200 +++ include/wine/winegccdef.h 2004-03-10 17:40:19.000000000 +0200 @@ -0,0 +1,99 @@ +/* + * Definitions that are defined by the winegcc when invoked. + * It is listed here so it can be used by anyone who needs to use + * gcc directly + * + * Copyright 2004 wine project + * + * 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 + */ + +#ifndef __WINEGCCDEF_H +#define __WINEGCCDEF_H + +#ifndef _MSC_VER + +#define WIN32 +#define _WIN32 +#define __WIN32 +#define __WIN32__ +#define __WINNT +#define __WINNT__ + +#define __stdcall __attribute__((__stdcall__)) +#define __cdecl __attribute__((__cdecl__)) +#define __fastcall //__attribute__((__fastcall__)) +#define _stdcall __attribute__((__stdcall__)) +#define _cdecl __attribute__((__cdecl__)) +#define _fastcall __attribute__((__fastcall__)) + +/* Wine specific defines */ +#define __WINE__ +#define WINE_UNICODE_NATIVE +#define __int8 char +#define __int16 short +#define __int32 int +#define __int64 long long +#define __WINE_GCC__ /* using both wine & gcc for STLPort */ + + +#define __declspec(x) __declspec_##x +#define _declspec(x) __declspec_##x + +/* works well. Some times the exact placing veries with in the statment */ +#define __declspec_selectany __attribute__((weak)) + +/* ignored by GCC and is warned (supported by MinGW) */ +#ifndef _NO_NO_WINEGCC_WARNING +# define __declspec_dllexport +#else +# define __declspec_dllexport __attribute__((dllexport)) +#endif + +/* ignored by GCC and is warned (supported by MinGW) */ +#ifndef _NO_NO_WINEGCC_WARNING +# define __declspec_dllimport +#else +# define __declspec_dllimport __attribute__((dllimport)) +#endif + +/* works */ +#define __declspec_noreturn __attribute__ ((noreturn)) +/* works */ +#define __declspec_nothrow __attribute__ ((nothrow)) +/* works ?? */ +#define __declspec_naked __attribute__ ((naked)) + +/* GCC is more restrictive about placing. look for TLS in gcc & msdn documentation */ +#define __declspec_thread __thread +/* no paralle defined to nothing */ +#define __declspec_novtable +/* Gcc only suports code ?? */ +#define __declspec_allocate(segname) __attribute__ (( section(segname) )) + +/* property is supported thrugh the file pretty_com.h */ +/* property( get=get_func_name|, put=put_func_name ) */ + +/* _declspec( uuid() ) and __uuidof are supported with code changes */ +/* see uuidof.h */ +#define __declspec_uuid(ComObjectGUID) error_SEE__uuidof_h__for_use_of_uuid + +#define __declspec_align(x) __attribute__((aligned(x))) +#define __declspec_deprecated __attribute__((deprecated)) +#define __declspec_noinline __attribute__((noinline)) + +#endif //_MSC_VER + +#endif /* __WINEGCCDEF_H */