<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<div class="moz-cite-prefix">Hi all,<br>
<br>
I have prepared a version of cygwin patches for 4.0.x varnish
versions, It would be nice to merge it with varnish master and 4.x
code.<br>
<br>
I tested them against last snapshots, my last tests was against
25/May/2014 snapshot ( <a
href="http://repo.varnish-cache.org/snapshots/varnish-4.0.0+2014-05-25.tar.gz">http://repo.varnish-cache.org/snapshots/varnish-4.0.0+2014-05-25.tar.gz</a>
)<br>
<br>
There are three patch files, I attach them at email:<br>
<ol>
<li>Varnish minor bugs, detected during Cygwin tests: <b>varnish-4.0.0+2014-05-25-1.bugs.patch</b></li>
<li>Varnish code modification to allow windows paths at Cygwin:
<b>varnish-4.0.0+2014-05-25-1.cygwin-src-winpaths.patch</b></li>
<li>Varnish makefile modifications to allow build application at
Cygwin: <b>varnish-4.0.0+2014-05-25-1.cygwin-make.patch</b></li>
</ol>
<p>The changes has been tested at Cygwin and Linux, so my changes
should not break anything at Linux build.<br>
</p>
<p>It will save to me a lot of time to me during Cygwin package
compilation/creation if you add the code to master, because will
avoid me to compare/merge old and new codes when ".patch" file
is not applied fine due line changes at master.<br>
<u><br>
</u></p>
<p><u>More detail about my changes:</u><br>
</p>
<p><b>1) </b><b>varnish-4.0.0+2014-05-25-1.bugs.patch</b> -
minor bugs<br>
</p>
<p> - At <u>bin/varnishd/cache/cache_acceptor.c</u><br>
</p>
<p>A << #if defined(SO_SNDTIMEO_WORKS) ||
defined(SO_RCVTIMEO_WORKS) >> is need to avoid warning
with "timeval tv;" when SO_SNDTIMEO or SO_RCVTIMEO are not
available<br>
</p>
<p> - At <u>doc/sphinx/Makefile.am and man/Makefile.am</u><br>
</p>
<p>$(top_srcdir) must be replaced with $(top_builddir) to avoid
errors when $(top_srcdir) != $(top_builddir) because
generated RST files are not created at source directories<br>
A mkdir -p $(shell dirname $@) must be also added at RST
creation.<br>
</p>
<p>At Cygwin, by default, the cygport program always separe src
and build dir during package build. <br>
At Linux it can be reproduced if you execute "./configure" and
"make" outside src directory, in order to separate built files:<br>
1. mkdir ~/builddir<br>
2. cd ~/builddir<br>
3. ~/src/varnish4/configure --srcdir=~/src/varnish4
(inside builddir)<br>
4. make (inside builddir)<br>
</p>
<p> - At <u>lib/libvarnishapi/Makefile.am:</u><br>
</p>
<p>vsl2rst must be replaced with vsl2rst$(EXEEXT) because at
cygwin, the executable is appended a ".exe" (at linux it does
nothing)<br>
</p>
<p> - At <u>lib/libvarnish/vfil.c</u>:<br>
</p>
<p>The code: bprintf(fnb, "/%s/%s", pfx, fn); Add a initial "/"
but pfx already starts with "/", duplicating the char:
//usr/local/...<br>
</p>
<p>This double // seems that does not cause trouble at Linux but
at Cygwin causes issues because //computer is used to access to
other computers.</p>
<p>Solution: replace bprintf(fnb, "/%s/%s", pfx, fn); with
bprintf(fnb, "%s/%s", pfx, fn);</p>
<p><br>
<b>2) varnish-4.0.0+2014-05-25-1.cygwin-src-winpaths.patch</b> -
allow windows paths<br>
</p>
<p>Minor changes at <b>bin/varnishd/mgt/mgt_vcc.c</b> and<b> </b><b>lib/libvarnish/vin.c</b>
to allow windows paths and "cmd.exe" shell when we are compiling
varnish at cygwin<br>
</p>
<p><b>3) </b><b>varnish-4.0.0+2014-05-25-1.cygwin-make.patch </b>
- cygwin compilation<b><br>
</b></p>
<p>Makefile and configure changes, to allow Cygwin compilation:<br>
- lib vmod are compiled after "bin" compilation to avoid some
errors: at windows those libs are linked with varnishd.exe file,
created at "bin" compilation, and standard compilation order
causes trouble with vmod dependences<br>
- VCC_CC variable (and others) definition at "configure"<br>
- Conditional definition and usage of lots of variables :
AC_SUBST(CYGWIN_varnishd_LDFLAGS) ,
AC_SUBST(CYGWIN_libvarnishd_OBJECTS) ,
AC_SUBST(CYGWIN_libvcc_LIBADD) ,
AC_SUBST(CYGWIN_libvmod_std_la_LIBADD) ,
AC_SUBST(CYGWIN_lib_la_LDFLAGS_no_undefined) only at Cygwin
compilations <br>
- etc...<br>
</p>
<p><br>
Tell me if you want more information about any cygwin change.<br>
</p>
<p>Regards,<br>
Jorge Díaz<br>
</p>
</div>
<br /><br />
<hr style='border:none; color:#909090; background-color:#B0B0B0; height: 1px; width: 99%;' />
<table style='border-collapse:collapse;border:none;'>
<tr>
<td style='border:none;padding:0px 15px 0px 8px'>
<a href="http://www.avast.com/">
<img border=0 src="http://static.avast.com/emails/avast-mail-stamp.png" />
</a>
</td>
<td>
<p style='color:#3d4d5a; font-family:"Calibri","Verdana","Arial","Helvetica"; font-size:12pt;'>
This email is free from viruses and malware because <a href="http://www.avast.com/">avast! Antivirus</a> protection is active.
</p>
</td>
</tr>
</table>
<br />
</body>
</html>