This is the mail archive of the gdb@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

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


    Date: Mon, 7 May 2001 19:10:59 +0300 (IDT)
    From: Eli Zaretskii <eliz@is.elta.co.il>

    I'm seeking approval for the following patches.  They remove all the
    DOS- and Windows-specific #ifdef's like "#ifdef _WIN32" and use the
    portable macros from filenames.h instead.  In addition, they convert
    code which used macros private to GDB, such as SLASH_P and ROOTED_P,
    to use the macros from filenames.h instead.

I was surprised that you sent this to gdb rather than gdb-patches.  I
added gdb-patches to the cc list.

    2001-05-07  Eli Zaretskii  <eliz@is.elta.co.il>

	    * source.c (mod_path, openp): Use HAVE_DOS_BASED_FILE_SYSTEM
	    instead of system-specific define's like _WIN32 and __MSDOS__.
	    Use IS_DIR_SEPARATOR and IS_ABSOLUTE_PATH instead of SLASH_P and
	    ROOTED_P.
	    (top-level): #include "filenames.h".

	    * 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".

	    * defs.h (SLASH_P, SLASH_CHAR, ROOTED_P): Remove definitions.
	    (SLASH_STRING): Define only for _WIN32.

The defs.h part of this patch is approved.

	    * completer.c: Use HAVE_DOS_BASED_FILE_SYSTEM instead of
	    __MSDOS_.

	    * cli/cli-cmds.c (cd_command): Use IS_DIR_SEPARATOR and
	    IS_ABSOLUTE_PATH instead of SLASH_P and ROOTED_P.  Replace
	    system-specific ifdefs with HAVE_DOS_BASED_FILE_SYSTEM.
	    (top-level): #include "filenames.h".


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]