On 7/25/2013 06:24, Jan Danielsson wrote:
    So .. we used the __CYGWIN__ macro to explicitly break fossil on
cygwin? That seems unnecessarily creative to me.

It is well known that the creators of Cygwin do this sort of thing because They're Just Mean. Maybe Fossil's creators are the same way?

    Out of curiosity (there must be one or two here who put them there):
What are/were their intended purposes [in the fossil code]?

I'm up for some spelunking.  Let's go:

compat/zlib/gzguts.h: Forces HAVE_VSNPRINTF to true. This sounds like a configure script bug to me. If it's fixed now, the ifdef should go. If vsnprintf() is still not being detected on Cygwin, that problem should be corrected at its source, not hacked around like this.

compat/zlib/contrib/inflate86/inffast.S: ELF vs. COFF executable format inference, to provide the leading underscore MS linkers want. Since the resulting binary works, one of the following must be true:

  a) Fossil is using the plain C version, not the optimized assembly; or
  b) the Cygwin linker now copes with this difference; or
c) WIN32 is somehow getting defined by this point, so the __CYGWIN__ test is redundant.

compat/zlib/contrib/puff/pufftest.c, compat/zlib/{examples,test}/*: Example code that came with zlib, so it doesn't matter if it doesn't build and work correctly.

compat/zlib/zutil.h: This seems bogus. The way it's coded implies that "WIN32" is defined when __CYGWIN__ is, which isn't currently true, unless you pass -mwin32 to the compiler, which you shouldn't in this case. However, if I'm wrong, and WIN32 *is* somehow being defined here, the test is appropriate and shouldn't be removed: zlib blobs created under Cygwin *should* be marked as having been created "on Unix" rather than "on Win32".

src/sqlite3.c: __CYGWIN__ stuff to be removed through other channels. :)

src/th_tcl.c: Not sure if this one can go or not. It might depend on whether your Fossil is linking to a Cygwin Tcl or the native Windows Tcl. Lluís, if you're reading this, did you test TH1 under Cygwin? Which Tcl is your fossil.exe linked to? (Ask ldd if you're not sure.)
fossil-users mailing list

Reply via email to