2 * MinGW wrapper: makes gcc behave like MinGW.
4 * Copyright 2002 Dimitrie O. Paun
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
22 #include "wine/port.h"
36 #define INCLUDEDIR "/usr/local/include/wine"
39 int main(int argc, char **argv)
44 gcc_argv = malloc(sizeof(char*) * (argc + 20));
47 gcc_argv[i++] = GCC_BIN;
49 gcc_argv[i++] = "-fshort-wchar";
50 gcc_argv[i++] = "-fPIC";
51 gcc_argv[i++] = "-I" INCLUDEDIR "/msvcrt";
52 gcc_argv[i++] = "-I" INCLUDEDIR "/windows";
53 gcc_argv[i++] = "-DWINE_DEFINE_WCHAR_T";
54 gcc_argv[i++] = "-D__int8=char";
55 gcc_argv[i++] = "-D__int16=short";
56 gcc_argv[i++] = "-D__int32=int";
57 gcc_argv[i++] = "-D__int64=long long";
59 for ( j = 1 ; j < argc ; j++ ) {
60 if (strcmp("-mno-cygwin", argv[j]) == 0) {
61 /* ignore this option */
63 gcc_argv[i++] = argv[j];
68 return execvp(GCC_BIN, gcc_argv);