public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: binutils@sourceware.cygnus.com
Subject: DOS/Windows-related changes in the libiberty subdirectory
Date: Mon, 06 Sep 1999 01:21:00 -0000	[thread overview]
Message-ID: <199909060821.EAA23450@mescaline.gnu.org> (raw)

The following changes solve DOS/Windows-related problems in libiberty.

1999-07-30  Eli Zaretskii  <eliz@is.elta.co.il>

	* pexecute.c (pexecute) [__GO32__]: Use P_WAIT instead of literal
	1.  Cast program to "char *", to shut up gcc.
	(pwait) [__DJGPP__]: Return ECHILD if called with a wrong pid.
	Fix the status code to conform to DJGPP's WIF* macros.

1999-07-13  Eli Zaretskii  <eliz@is.elta.co.il>

	* argv.c (BACKSLASH_AS_SLASH) [__MSDOS__ || _WIN32]: Define.
	(buildargv) [BACKSLASH_AS_SLASH]: Backslash is an escape character
	only before a quote character.

*** libiberty/pexecute.c~0	Fri May  1 18:47:52 1998
--- libiberty/pexecute.c	Fri Jul 30 19:12:16 1999
*************** pexecute (program, argv, this_pname, tem
*** 140,146 ****
  
  #ifdef __GO32__
    /* ??? What are the possible return values from spawnv?  */
!   rc = (flags & PEXECUTE_SEARCH ? spawnvp : spawnv) (1, program, argv);
  #else
    char *scmd, *rf;
    FILE *argfile;
--- 140,146 ----
  
  #ifdef __GO32__
    /* ??? What are the possible return values from spawnv?  */
!   rc = (flags & PEXECUTE_SEARCH ? spawnvp : spawnv) (P_WAIT, program, argv);
  #else
    char *scmd, *rf;
    FILE *argfile;
*************** pexecute (program, argv, this_pname, tem
*** 187,193 ****
    if (rc == -1)
      {
        *errmsg_fmt = install_error_msg;
!       *errmsg_arg = program;
        return -1;
      }
  
--- 187,193 ----
    if (rc == -1)
      {
        *errmsg_fmt = install_error_msg;
!       *errmsg_arg = (char *)program;
        return -1;
      }
  
*************** pwait (pid, status, flags)
*** 207,219 ****
        /* Called twice for the same child?  */
        || pid == last_reaped)
      {
!       /* ??? ECHILD would be a better choice.  Can we use it here?  */
        errno = EINVAL;
        return -1;
      }
!   /* ??? Here's an opportunity to canonicalize the values in STATUS.
!      Needed?  */
    *status = last_status;
    last_reaped = last_pid;
    return last_pid;
  }
--- 207,227 ----
        /* Called twice for the same child?  */
        || pid == last_reaped)
      {
!       /* ECHILD is a better choice, if we can use it.  */
! #ifdef __DJGPP__
!       errno = ECHILD;
! #else
        errno = EINVAL;
+ #endif
        return -1;
      }
!   /* Here's an opportunity to canonicalize the values in STATUS, if
!      needed.  */
! #ifdef __DJGPP__
!   *status = (last_status >> 8);
! #else
    *status = last_status;
+ #endif
    last_reaped = last_pid;
    return last_pid;
  }
*** libiberty/argv.c1~	Fri May  1 18:47:48 1998
--- libiberty/argv.c	Tue Jul 27 19:15:56 1999
*************** extern char *strdup ();		/* Duplicate a 
*** 55,60 ****
--- 55,64 ----
  
  #endif	/* __STDC__ */
  
+ #if defined(__MSDOS__) || defined(_WIN32)
+ #define BACKSLASH_AS_SLASH
+ #endif
+ 
  #include "alloca-conf.h"
  
  #ifndef NULL
*************** char *input;
*** 277,282 ****
--- 281,290 ----
  		    }
  		  else if (*input == '\\')
  		    {
+ #ifdef BACKSLASH_AS_SLASH
+ 		      /* Don't break dosish file names.  */
+ 		      if (input[1] == '\'' || input[1] == '"')
+ #endif
  		      bsquote = 1;
  		    }
  		  else if (squote)

                 reply	other threads:[~1999-09-06  1:21 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=199909060821.EAA23450@mescaline.gnu.org \
    --to=eliz@gnu.org \
    --cc=binutils@sourceware.cygnus.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).