This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[patch] to gcc: don't use #elif
- To: gcc-patches at gcc dot gnu dot org
- Subject: [patch] to gcc: don't use #elif
- From: msokolov at ivan dot Harhan dot ORG (Michael Sokolov)
- Date: Sun, 24 Dec 00 09:43:45 PST
Hi there,
Below is an obviously correct patch for gcc. Would someone please check it in
under the obviously correct rule?
--
Michael Sokolov
Public Service Agent
International Engineering and Science Task Force
1351 VINE AVE APT 27 Phone: +1-714-738-5409
FULLERTON CA 92833-4291 USA (home office)
E-mail: msokolov@ivan.Harhan.ORG (ARPA TCP/SMTP)
2000-12-24 Michael Sokolov <msokolov@ivan.Harhan.ORG>
* cppinit.c (INO_T_EQ): Don't use #elif, fix formatting.
* mkdeps.c (base_name): Don't use #elif.
Index: cppinit.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/cppinit.c,v
retrieving revision 1.127
diff -p -r1.127 cppinit.c
*** cppinit.c 2000/12/17 22:40:32 1.127
--- cppinit.c 2000/12/24 15:50:08
*************** Foundation, 59 Temple Place - Suite 330,
*** 40,50 ****
Cygwin's emulation can generate non-unique inodes, so don't use it.
VMS has non-numeric inodes. */
#ifdef VMS
! #define INO_T_EQ(a, b) (!memcmp (&(a), &(b), sizeof (a)))
! #elif (defined _WIN32 && ! defined (_UWIN)) || defined __MSDOS__
! #define INO_T_EQ(a, b) 0
#else
! #define INO_T_EQ(a, b) ((a) == (b))
#endif
/* Internal structures and prototypes. */
--- 40,52 ----
Cygwin's emulation can generate non-unique inodes, so don't use it.
VMS has non-numeric inodes. */
#ifdef VMS
! # define INO_T_EQ(a, b) (!memcmp (&(a), &(b), sizeof (a)))
#else
! # if (defined _WIN32 && ! defined (_UWIN)) || defined __MSDOS__
! # define INO_T_EQ(a, b) 0
! # else
! # define INO_T_EQ(a, b) ((a) == (b))
! # endif
#endif
/* Internal structures and prototypes. */
Index: mkdeps.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/mkdeps.c,v
retrieving revision 1.7
diff -p -r1.7 mkdeps.c
*** mkdeps.c 2000/11/17 04:16:54 1.7
--- mkdeps.c 2000/12/24 15:50:09
*************** base_name (fname)
*** 117,126 ****
#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
if (ISALPHA (s[0]) && s[1] == ':') s += 2;
if ((p = strrchr (s, '\\'))) s = p + 1;
! #elif defined VMS
if ((p = strrchr (s, ':'))) s = p + 1; /* Skip device. */
if ((p = strrchr (s, ']'))) s = p + 1; /* Skip directory. */
if ((p = strrchr (s, '>'))) s = p + 1; /* Skip alternate (int'n'l) dir. */
#endif
if ((p = strrchr (s, '/'))) s = p + 1;
return s;
--- 117,128 ----
#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
if (ISALPHA (s[0]) && s[1] == ':') s += 2;
if ((p = strrchr (s, '\\'))) s = p + 1;
! #else
! #ifdef VMS
if ((p = strrchr (s, ':'))) s = p + 1; /* Skip device. */
if ((p = strrchr (s, ']'))) s = p + 1; /* Skip directory. */
if ((p = strrchr (s, '>'))) s = p + 1; /* Skip alternate (int'n'l) dir. */
+ #endif
#endif
if ((p = strrchr (s, '/'))) s = p + 1;
return s;