bug-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Feature Branch Windows Build Broken - lib/canonicalize.c - ELOOP &


From: Derek Price
Subject: Re: Feature Branch Windows Build Broken - lib/canonicalize.c - ELOOP & lstat
Date: Wed, 25 May 2005 11:20:01 -0400
User-agent: Mozilla Thunderbird 1.0.2 (Windows/20050317)

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Conrad T. Pino wrote:

>Hi Derek,
>
>Here's a rough draft of a patch that allows Windows build to complete.
>The draft includes edited files only and ignores generated files and
>Windows build projects files are also omitted.
>
>Briefly the plan is:
>
> #define stat wnt_stat
> #define lstat wnt_stat
>
> int wnt_stat (const char *file, struct wnt_stat *sb);
>
> Delete wnt_lstat definition


Are stat and lstat really equivalent on Windows?

>Index: lib/system.h
>===================================================================
>RCS file: /cvs/ccvs/lib/system.h,v
>retrieving revision 1.76
>diff -u -p -r1.76 system.h
>--- lib/system.h 24 May 2005 21:05:37 -0000 1.76
>+++ lib/system.h 25 May 2005 01:20:36 -0000
>@@ -371,7 +371,7 @@ extern int errno;
> otherwise return it unchanged. */
> #define convert_blocks(b, k) ((k) ? ((b) + 1) / 2 : (b))
>
>-#ifndef S_ISLNK
>+#if !defined(lstat) && !defined(S_ISLNK)
> # define lstat stat
> #endif


I suspect this was only relevant on Windows anyhow and the entire block
can be removed.

>Index: windows-NT/config.h.in.footer
>===================================================================
>RCS file: /cvs/ccvs/windows-NT/config.h.in.footer,v
>retrieving revision 1.4
>diff -u -p -r1.4 config.h.in.footer
>--- windows-NT/config.h.in.footer 1 Mar 2005 14:37:39 -0000 1.4
>+++ windows-NT/config.h.in.footer 25 May 2005 01:20:37 -0000
>@@ -11,11 +11,7 @@
> #define CVS_MKDIR wnt_mkdir
> int wnt_mkdir (const char *PATH, int MODE);
>
>-#define CVS_STAT wnt_stat
>-int wnt_stat ();
>-
>-#define CVS_LSTAT wnt_lstat
>-int wnt_lstat ();
>+int wnt_stat (const char *file, struct wnt_stat *sb);


This may prove unnecessary.  See below.

> #define CVS_RENAME wnt_rename
> int wnt_rename (const char *, const char *);
>@@ -95,3 +91,6 @@ char *sock_strerror (int errnum);
> /* getpagesize is missing on Windows, but 4096 seems to do the right
> thing. */
> #define getpagesize() 4096
>+
>+/* Windows has no ELOOP value in errno.h */
>+#define ELOOP 10000


How about #define ELOOP EMLINK?  At least if this error ever comes up,
sterror will then produce a somewhat meaningful error message on Windows.

>Index: windows-NT/config.h.in.in
>===================================================================
>RCS file: /cvs/ccvs/windows-NT/config.h.in.in,v
>retrieving revision 1.30
>diff -u -p -r1.30 config.h.in.in
>--- windows-NT/config.h.in.in 2 May 2005 14:08:18 -0000 1.30
>+++ windows-NT/config.h.in.in 25 May 2005 01:20:37 -0000
>@@ -92,8 +92,9 @@
> message to be appended to the temp file when the editor is started. */
> #undef FORCE_USE_EDITOR
>
>-/* Define if gettimeofday clobbers localtime's static buffer. */
>-#undef GETTIMEOFDAY_CLOBBERS_LOCALTIME_BUFFER


Why are you removing these lines?

Cheers,

Derek
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (Cygwin)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFClJehLD1OTBfyMaQRAghmAJ92Y1HxX1mz9Nr5N/vGtEQeu3XORQCfaFP1
5XRVx2RxZSdqN4YiqT1jrsw=
=I2jp
-----END PGP SIGNATURE-----






reply via email to

[Prev in Thread] Current Thread [Next in Thread]