1 /* Helper routines for cygwin-specific command-line parsing.
2 Contributed by Christopher Faylor (cgf@redhat.com)
3 Copyright 2003 Free Software Foundation, Inc.
5 This file is part of GCC.
7 GCC is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 2, or (at your option)
12 GCC is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
17 You should have received a copy of the GNU General Public License
18 along with GCC; see the file COPYING. If not, write to
19 the Free Software Foundation, 51 Franklin Street, Fifth Floor,
20 Boston, MA 02110-1301, USA. */
24 #include "coretypes.h"
27 #include "safe-ctype.h"
31 static void remove_w32api (void);
33 static void add_mingw (void);
34 static void set_mingw (void) __attribute__ ((constructor));
41 for (av = cvt_to_mingw; *av; av++)
44 while ((p = strstr (*av, "-cygwin")))
46 char *over = p + sizeof ("-cygwin") - 1;
47 memmove (over + 1, over, strlen (over));
48 memcpy (p, "-mingw32", sizeof("-mingw32") - 1);
55 if (!sawcygwin && !strstr (*av, "mingw"))
56 strcat (*av, CYGWIN_MINGW_SUBDIR);
64 char *env = getenv ("GCC_CYGWIN_MINGW");
65 if (env && *env == '1')