Re: [RFA] Remove OS-specific defines (was: _WIN32?)

Eli Zaretskii
2001-06-10T06:28:00Z

> Date: Mon, 7 May 2001 10:38:55 -0700
> From: Kevin Buettner <kevinb@cygnus.com>
>
> On May 7, 7:10pm, Eli Zaretskii wrote:
>
> > * solib.c (solib_open): Use IS_DIR_SEPARATOR and IS_ABSOLUTE_PATH
> > instead of SLASH_CHAR, ROOTED_P and SLASH_P.
> > (top-level): #include "filenames.h".
>
> Your changes to solib.c are approved. (FWIW, I glanced over your
> changes to the other files and they look good too.)
>
> > * defs.h (SLASH_P, SLASH_CHAR, ROOTED_P): Remove definitions.
> > (SLASH_STRING): Define only for _WIN32.
>
> Once your changes to the other .c files are approved, I think this
> one can be regarded as an obvious change.
>
> Don't forget to also remove the definitions of SLASH_P, SLASH_CHAR, and
> ROOTED_P in config/i386/xm-cygwin.h and config/i386/xm-go32.h.

This time is now. Chris, is the patch below okay with you?

2001-06-10 Eli Zaretskii <eliz@is.elta.co.il>

* config/i386/xm-go32.h (SLASH_P, ROOTED_P, SLASH_CHAR)
(SLASH_STRING): Remove unised definitions
* config/i386/xm-go32.h: Likewise.

--- gdb/config/i386/xm-go32.h~0 Mon Apr 3 17:44:56 2000
+++ gdb/config/i386/xm-go32.h Sun Jun 10 15:50:42 2001
@@ -24,13 +24,6 @@

#define GDBINIT_FILENAME "gdb.ini"

-#define SLASH_P(X) ((X)=='\\' || (X) == '/')
-
-#define ROOTED_P(X) ((SLASH_P((X)[0])) || ((X)[0] && (X)[1] ==':'))
-
-#define SLASH_CHAR '/'
-#define SLASH_STRING "/"
-
#define CRLF_SOURCE_FILES

#define DIRNAME_SEPARATOR ';'
--- gdb/config/i386/xm-cygwin.h~0 Fri Mar 2 05:14:48 2001
+++ gdb/config/i386/xm-cygwin.h Sun Jun 10 16:00:46 2001
@@ -24,11 +24,6 @@

#define GDBINIT_FILENAME "gdb.ini"

-#define SLASH_P(X) ((X)=='\\' || (X) == '/')
-#define ROOTED_P(X) ((SLASH_P((X)[0]))|| ((X)[1] ==':'))
-#define SLASH_CHAR '/'
-#define SLASH_STRING "/"
-
/* Define this if source files use \r\n rather than just \n. */
#define CRLF_SOURCE_FILES