This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: cygwin bash 2.05b patches and "rebash" a debugger for bash (http://bashdb.sourceforge.net)


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@cygwin.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/


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