Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Date: Fri, 12 Sep 2003 13:31:30 +0200 From: Corinna Vinschen To: cygwin AT cygwin DOT com Subject: Re: cygwin bash 2.05b patches and "rebash" a debugger for bash (http://bashdb.sourceforge.net) Message-ID: <20030912113130.GG9981@cygbert.vinschen.de> Reply-To: cygwin AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com References: <16224 DOT 32353 DOT 754787 DOT 145806 AT panix3 DOT panix DOT com> <20030911152028 DOT GV9981 AT cygbert DOT vinschen DOT de> <16224 DOT 57356 DOT 609720 DOT 972967 AT panix3 DOT panix DOT com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <16224.57356.609720.972967@panix3.panix.com> User-Agent: Mutt/1.4.1i On Thu, Sep 11, 2003 at 04:50:20PM -0400, R. Bernstein wrote: > Corinna Vinschen writes: > > Using the bash source package from the Cygwin distro might help. > > The source does not contain patches or diffs. Are there patches stored > separately from source? What happens when a new release comes out? > (Debian patches are nicely bundled for each particular problem and can > be installed and uninstalled separately) > > I can do a "diff -Naur" to get the diffs and try to sort out which > ones are specific to cygwin as opposed to general patches such as > those found in bash public patches, I was hoping however for maybe > some coordination here. I have just ran that diff since I'm passing over bash maintainership to Ronald Landheer-Cieslak. The Cygwin version is vanilla bash plus patches 001 to 004 plus the below patches: diff -rNup bash-2.05b/bashline.c bash-2.05b-cygwin/bashline.c --- bash-2.05b/bashline.c 2003-09-12 12:53:45.360218000 +0200 +++ bash-2.05b-cygwin/bashline.c 2002-11-06 18:45:23.000000000 +0100 @@ -1055,7 +1055,11 @@ attempt_shell_completion (text, start, e filenames and leave directories in the match list. */ if (matches == (char **)NULL) rl_ignore_some_completions_function = bash_ignore_filenames; +#if 0 else if (matches[1] == 0 && CMD_IS_DIR(matches[0])) +#else + else if (matches[1] == 0 && absolute_pathname (matches[0]) == 0) +#endif /* Turn off rl_filename_completion_desired so readline doesn't append a slash if there is a directory with the same name in the current directory, or other filename-specific things. diff -rNup bash-2.05b/configure bash-2.05b-cygwin/configure --- bash-2.05b/configure 2002-07-16 15:31:47.000000000 +0200 +++ bash-2.05b-cygwin/configure 2002-08-07 10:56:13.000000000 +0200 @@ -15346,7 +15346,7 @@ lynxos*) LOCAL_CFLAGS=-DRECYCLES_PIDS ;; linux*) LOCAL_LDFLAGS=-rdynamic ;; # allow dynamic loading *qnx*) LOCAL_CFLAGS="-Dqnx -F -3s" LOCAL_LDFLAGS="-3s" LOCAL_LIBS="-lunix -lncurses" ;; powerux*) LOCAL_LIBS="-lgen" ;; -cygwin*) LOCAL_LIBS="-luser32" ;; +cygwin*) LOCAL_CFLAGS="-DRECYCLES_PIDS" ;; opennt*|interix*) LOCAL_CFLAGS="-DNO_MAIN_ENV_ARG -DBROKEN_DIRENT_D_INO" ;; esac diff -rNup bash-2.05b/configure.in bash-2.05b-cygwin/configure.in --- bash-2.05b/configure.in 2002-07-16 15:31:25.000000000 +0200 +++ bash-2.05b-cygwin/configure.in 2002-08-07 10:56:13.000000000 +0200 @@ -851,7 +851,7 @@ lynxos*) LOCAL_CFLAGS=-DRECYCLES_PIDS ;; linux*) LOCAL_LDFLAGS=-rdynamic ;; # allow dynamic loading *qnx*) LOCAL_CFLAGS="-Dqnx -F -3s" LOCAL_LDFLAGS="-3s" LOCAL_LIBS="-lunix -lncurses" ;; powerux*) LOCAL_LIBS="-lgen" ;; -cygwin*) LOCAL_LIBS="-luser32" ;; +cygwin*) LOCAL_CFLAGS="-DRECYCLES_PIDS" ;; opennt*|interix*) LOCAL_CFLAGS="-DNO_MAIN_ENV_ARG -DBROKEN_DIRENT_D_INO" ;; esac diff -rNup bash-2.05b/findcmd.c bash-2.05b-cygwin/findcmd.c --- bash-2.05b/findcmd.c 2002-03-19 16:19:05.000000000 +0100 +++ bash-2.05b-cygwin/findcmd.c 2003-03-13 10:32:08.000000000 +0100 @@ -96,7 +96,7 @@ file_status (name) if (S_ISDIR (finfo.st_mode)) return (FS_EXISTS|FS_DIRECTORY); -#if defined (AFS) +#if defined (AFS) || defined (__CYGWIN__) /* We have to use access(2) to determine access because AFS does not support Unix file system semantics. This may produce wrong answers for non-AFS files when ruid != euid. I hate AFS. */ diff -rNup bash-2.05b/general.c bash-2.05b-cygwin/general.c --- bash-2.05b/general.c 2002-06-12 22:57:55.000000000 +0200 +++ bash-2.05b-cygwin/general.c 2002-11-22 20:30:55.000000000 +0100 @@ -470,7 +470,16 @@ make_absolute (string, dot_path) char *result; if (dot_path == 0 || ABSPATH(string)) +#ifdef __CYGWIN__ + { + char pathbuf[PATH_MAX + 1]; + + cygwin_conv_to_full_posix_path (string, pathbuf); + result = savestring (pathbuf); + } +#else result = savestring (string); +#endif else result = sh_makepath (dot_path, string, 0); diff -rNup bash-2.05b/test.c bash-2.05b-cygwin/test.c --- bash-2.05b/test.c 2002-02-28 16:54:47.000000000 +0100 +++ bash-2.05b-cygwin/test.c 2003-03-13 10:32:08.000000000 +0100 @@ -102,7 +102,7 @@ static int test_error_return; /* We have to use access(2) for machines running AFS, because it's not a Unix file system. This may produce incorrect answers for non-AFS files. I hate AFS. */ -#if defined (AFS) +#if defined (AFS) || defined (__CYGWIN__) # define EACCESS(path, mode) access(path, mode) #else # define EACCESS(path, mode) test_eaccess(path, mode) -- Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Developer mailto:cygwin AT cygwin DOT com Red Hat, Inc. -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/