[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: Feature Branch Windows Build Broken - lib/canonicalize.c - ELOOP & l
From: |
Conrad T. Pino |
Subject: |
RE: Feature Branch Windows Build Broken - lib/canonicalize.c - ELOOP & lstat |
Date: |
Wed, 25 May 2005 11:45:18 -0700 |
Hi Derek,
> From: Derek Price
>
> Are stat and lstat really equivalent on Windows?
Windows Visual C doesn't implement "lstat" in any fashion.
The "wnt_lstat" function in "windows-NT/filesubr.c" appears to call
"lstat" but that is a macro defined to "stat" in "lib/system.h" which
is included in "cvs.h" which is included by "windows-NT/filesubr.c".
The point is easily proved by either of:
#undef lstat
or
#define lstat statxx
just before the "wnt_lstat" function definition.
The former produces a link error: unresolved external symbol _lstat
The latter produces a warning: "lstat" macro redefinition in...
> >Index: lib/system.h
> >===================================================================
[snip]
> >-#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.
That is the macro Windows has previously relied upon for "lstat".
We can drop it only if we do the same or similar somewhere else.
> >Index: windows-NT/config.h.in.footer
> >===================================================================
[snip]
> >-#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.
I didn't see anything pertinent below. What did I miss?
> >+
> >+/* 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.
I like it!!!
> >Index: windows-NT/config.h.in.in
> >===================================================================
[snip]
> >-/* Define if gettimeofday clobbers localtime's static buffer. */
> >-#undef GETTIMEOFDAY_CLOBBERS_LOCALTIME_BUFFER
>
> Why are you removing these lines?
Yes, macro "GETTIMEOFDAY_CLOBBERS_LOCALTIME_BUFFER" is no longer used.
The "mkconfig.pl" script detects more than it reports. I enable a full
check whenever working on Windows "config.h" and inputs. This time it
reported this macro no longer appears in root "config.h.in" and a grep
of the source tree confirms it is unused.
-----------------------
We're missing part of your response regarding "This may prove..." from
above so I take it we're not ready to commit a patch just yet.
> Cheers,
Ditto,
> Derek
Conrad