xm-cygwin.h revision 52284
152284Sobrien/* Configuration for GNU C-compiler for hosting on Windows NT.
252284Sobrien   using a unix style C library.
352284Sobrien   Copyright (C) 1995, 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
452284Sobrien
552284SobrienThis file is part of GNU CC.
652284Sobrien
752284SobrienGNU CC is free software; you can redistribute it and/or modify
852284Sobrienit under the terms of the GNU General Public License as published by
952284Sobrienthe Free Software Foundation; either version 2, or (at your option)
1052284Sobrienany later version.
1152284Sobrien
1252284SobrienGNU CC is distributed in the hope that it will be useful,
1352284Sobrienbut WITHOUT ANY WARRANTY; without even the implied warranty of
1452284SobrienMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
1552284SobrienGNU General Public License for more details.
1652284Sobrien
1752284SobrienYou should have received a copy of the GNU General Public License
1852284Sobrienalong with GNU CC; see the file COPYING.  If not, write to
1952284Sobrienthe Free Software Foundation, 59 Temple Place - Suite 330,
2052284SobrienBoston, MA 02111-1307, USA. */
2152284Sobrien
2252284Sobrien#define EXECUTABLE_SUFFIX ".exe"
2352284Sobrien#define NO_SYS_SIGLIST 1
2452284Sobrien
2552284Sobrien/* We support both "/" and "\" since everybody tests both but we
2652284Sobrien   default to "/".  This is important because if gcc produces Win32
2752284Sobrien   paths containing backslashes, make and configure may treat the
2852284Sobrien   backslashes as escape characters.  Many Win32 programs use forward
2952284Sobrien   slashes so using a forward slash shouldn't be problematic from the
3052284Sobrien   perspective of wanting gcc to produce native Win32 paths. */
3152284Sobrien#define DIR_SEPARATOR '/'
3252284Sobrien#define DIR_SEPARATOR_2 '\\'
3352284Sobrien
3452284Sobrien/* Convert win32 style path lists to POSIX style for consistency. */
3552284Sobrien#undef GET_ENV_PATH_LIST
3652284Sobrien#define GET_ENV_PATH_LIST(VAR,NAME)					\
3752284Sobriendo {									\
3852284Sobrien  char *_epath;								\
3952284Sobrien  char *_posixepath;							\
4052284Sobrien  _epath = _posixepath = getenv (NAME);					\
4152284Sobrien  /* if we have a posix path list, convert to posix path list */	\
4252284Sobrien  if (_epath != NULL && *_epath != 0					\
4352284Sobrien      && ! cygwin_posix_path_list_p (_epath))				\
4452284Sobrien    {									\
4552284Sobrien      char *p;								\
4652284Sobrien      _posixepath = (char *) xmalloc					\
4752284Sobrien	(cygwin_win32_to_posix_path_list_buf_size (_epath));		\
4852284Sobrien      cygwin_win32_to_posix_path_list (_epath, _posixepath);		\
4952284Sobrien    }									\
5052284Sobrien  (VAR) = _posixepath;							\
5152284Sobrien} while (0)
5252284Sobrien
5352284Sobrien#define PATH_SEPARATOR ':'
5452284Sobrien
5552284Sobrien/* This is needed so that protoize will compile.  */
5652284Sobrien#ifndef POSIX
5752284Sobrien#define POSIX
5852284Sobrien#endif
59