This is the mail archive of the 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]

Re: GNU RCS with MinGW32 or CygWin32

Hi Brendan,

I've attempted without success, so far, to port bash to Mingw32.  I'm 
real interested in getting this accomplished so maybe we can work 
together.  The main problems are the fork and wait functions.  There are 
some other UNIX specific functions (you know, getuid, getgid, etc) that 
can be easily stubbed but there are some that cannot.

Also the inode value from the fstat and stat is always returned as zero.  
Don't blame Colin or JanJaap for that, that's the way that M$ designed 
the function; even though there is a file index number that could have 
been used.

I've been able to port to Mingw32 most of the fileutils, textutils, 
sh-utils, and grep.  As an aside to this, you know the problems about 
\r\n vs \n; well, with native compiled utilities, it seems that the 
default open will read \r\n or just \n and will write \r\n.

To execute configure I currently start the cygwin bash with my 
environment setup for cygwin, run configure, setup my environment for 
Ming or EGCS and execute make -i -k >& make.log, take care of errors and 
repeat the make process.  Occasionally I have to gcc by hand, which 
isn't too bad if you do it in bash.  Example:

export CFLAGS="-c -g -O2"
for file in `ls *.c`; do gcc $CFLAGS $file; done

In this way I am able to compile all programs with one command.

As for djgpp, they have a 16 bit version of bash, crippled with 8.3 
filenames.  They say they support long file names with special 
environment variables but I've never gotten it to work.

My ideas for fork is to emulate it by calling one of the spawn or thread 
functions (I haven't determined which might be better); for wait it is 
to emulate it by calling the _cwait function.  For lstat I #define lstat 
stat.  For the checking of inodes for the same file I am #ifndef 
__MINGW32__ ... #endif around the code; this means that for "cat 
thisfile > thisfile" you will end up with a zero length file, but, that 
is the way it works on AIX unix.

-        \\||//

Check out these great gnu-win32 related sites:                  (ftp site)                    (Comercial Page)                   (Project Page)                     (Mail Archives)     (HTML Man Pages)                               (Sergey Okhapkin)                (Sergey's ftp site)           (Colin Peters)    (Mumit Khan)                   (Chuck Bogorad's ports) (Den Internet Services - US mirror and ports)  (GNU-Win32 Bash Configuration)                  (Rob Warner - software ports)     (more - software portals)   (Redhat Package Manager)


add gnu-win32 or gnuwin32 to the search criteria.

>From: Brendan Simon <>
>To: "'GNU-Win32'" <>
>Subject: GNU RCS with MinGW32 or CygWin32
>Date: Fri, 13 Feb 1998 10:15:00 +1100
>I wish to compile GNU RCS.
>I wish to use this in an environment where Unix is not a concern (to
>most anyway)
>so I thought I would us MinGW32 as it is apparently quite a bit faster
>than CygWin32.
>Having used the CygWin stuff I have no reason to doubt it.  I'd prefer
>to use CygWin
>for the portability aspects and even simple tools like 'ls', 'cat',
>'grep', etc.
>Anyways the main problem with MinGW32 is that it does not handle
>configure scripts.
>Not knowing much about them I had a quick look at the script and it
>looks like a
>bash script.  Is this true ?  If so, then I guess I'd need bash ported
>to MinGW32.
>Is there one available ?
>Am I fighting a loosing battle trying to compile this type of program
>with MinGW32 ?
>ie. Should I forget it and stick with CygWin ?
>I have seen binary ports of GNU RCS before supposably done with DJGPP 
>M$-Windows compilers.  How are these done without using configure.
>Any help, advice or pointers would be greatly appreciated.
>Thanks in advance,
>Brendan Simon
>For help on using this list (especially unsubscribing), send a message 
>"" with one line of text: "help".

Get Your Private, Free Email at
For help on using this list (especially unsubscribing), send a message to
"" with one line of text: "help".

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