r1721 - trunk/varnish-cache/bin/varnishd

des at projects.linpro.no des at projects.linpro.no
Thu Jul 19 13:49:43 CEST 2007


Author: des
Date: 2007-07-19 13:49:43 +0200 (Thu, 19 Jul 2007)
New Revision: 1721

Modified:
   trunk/varnish-cache/bin/varnishd/mgt_vcc.c
Log:
Use the correct cc command line on MacOS.  This is a gross hack.
Also, ignore the result of dlclose().


Modified: trunk/varnish-cache/bin/varnishd/mgt_vcc.c
===================================================================
--- trunk/varnish-cache/bin/varnishd/mgt_vcc.c	2007-07-19 11:17:59 UTC (rev 1720)
+++ trunk/varnish-cache/bin/varnishd/mgt_vcc.c	2007-07-19 11:49:43 UTC (rev 1721)
@@ -181,7 +181,11 @@
 	/* Attempt to open a pipe to the system C-compiler */
 	len = snprintf(buf, sizeof buf,
             "ln -f %s _.c ;"			/* XXX: for debugging */
+#ifdef __APPLE__
+	    "exec cc -dynamiclib -Wl,-flat_namespace,-undefined,suppress -o %s -x c - < %s 2>&1",
+#else
 	    "exec cc -fpic -shared -Wl,-x -o %s -x c - < %s 2>&1",
+#endif
 	    sf, of, sf);
 	xxxassert(len < sizeof buf);
 
@@ -229,7 +233,7 @@
 		free(of);
 		of = NULL;
 	} else
-		AZ(dlclose(p));
+		(void)dlclose(p);
 
 	/* clean up and return */
 	unlink(sf);




More information about the varnish-commit mailing list