[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [bug-patch] Building on mingw
From: |
Andreas Gruenbacher |
Subject: |
Re: [bug-patch] Building on mingw |
Date: |
Sat, 6 Jun 2009 01:27:21 +0200 |
User-agent: |
KMail/1.9.9 |
Martin,
thank you very much for your feedback.
On Sunday, 17 May 2009 8:20:51 Martin Panter wrote:
> I've just successfully built the alpha release from
>
> ftp://alpha.gnu.org/gnu/patch/patch-2.5.9-109-g70df4e4.tar.gz
>
> but there were a few issues to sort out. At least the first few of
> these I think you might want to fix in the code.
>
> 1. The gnulib getopt stuff seemed to be missing getopt_int.h. I seem
> to have fixed this by copying the file straight from gnulib.
>
> 2. Also in the gnulib stuff, the xstrndup function needs strndup, but
> I don't think this is present on Windows. I just made the code use
> strdup and truncate the string, but perhaps you can get a better
> strndup from gnulib?
I have added the missing files from gnulib now.
> 3. The makefile seemed to want getopt.h to exist in the current
> directory. If I supplied GETOPT_H=gl/lib/getopt.h it fixed the
> problem.
Fixed in the Makefile.in.
> 4. You can't assign stderr into stdout! I guess it works with the gnu
> C library but apparently not with other C libraries. I just removed
> the assignment to get it to compile, because I'm not interested in
> patched output going to stdout for the moment. But I guess the proper
> fix would be to set a variable somewhere to either stdout or stderr,
> and change all the message printouts to use it rather than blindly use
> stdout.
I would prefer to dup/dup2 the file descriptors as needed. Does the latest
alpha version work for you?
> 5. The "rename" function in Mingw, which uses an MS C runtime library,
> doesn't work if the destination file already exists, so I added
> "remove (target)" calls before it. This is a special Win32 only
> workaround though. Perhaps it would be appropriate to use the "rename"
> stuff out of the gnulib?
Also added from gnulib.
> I also made some changes (in patch-seekable.diff attached) to avoid
> problems with reading LF newline files in Windows text mode (CRLF).
This also looks good, but I still need to check more carefully, and so this
isn't included in the latest snapshot, yet.
I have uploaded the latest alpha version here:
ftp://alpha.gnu.org/gnu/patch/patch-2.5.9-117-g6d9e60f.tar.gz
Are there any remaining problems (aside from the seek issue)?
Thanks,
Andreas
- Re: [bug-patch] Building on mingw,
Andreas Gruenbacher <=