]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
From: Henrik Nordstrom <hno@hem.passagen.se>
authorwessels <>
Thu, 8 Jan 1998 04:16:25 +0000 (04:16 +0000)
committerwessels <>
Thu, 8 Jan 1998 04:16:25 +0000 (04:16 +0000)
* Symlink destinations in FTP listings
* @SQUID_PTHREAD_LIB@ and not @PTHREADLIB@ when linking squid, to only
  link in -lpthreads when async-io is used.
* --enable-kill-parent-hack instead of --enable-kill-parent

New changes

* -D_REENTRANT when compiling with pthreads (--enable-async-io)
* Disable use of SIGUSR1,2 when using linuxthreads (-lpthreads on linux)
  linuxthreads uses these two signals internally, since there is no
  other available signals to use..

ChangeLog
configure.in
src/Makefile.in
src/ftp.cc
src/main.cc

index caf89ee771b2de69df2977f413a8e5ff1b3ac8fd..be213707d6765d45585b4879d028b2d25dffb8ae 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+       - -D_REENTRANT when linking with -lpthreads (Henrik Nordstrom)
+       - Show symlink destinations as a hyperlink in FTP listings
+         (Henrik Nordstrom)
+
 Changes to squid-1.2.beta11 (Jan 6, 1998):
 
        - Fixed fake 'struct rusage' definition which prevented compling
index 805fcf61094bf05d045a42a6446ffde04716822c..41fdf945e3d8e2df81fb8008a36c6f3ebcdb4833 100644 (file)
@@ -3,13 +3,13 @@ dnl  Configuration input file for Squid
 dnl
 dnl  Duane Wessels, wessels@nlanr.net, February 1996 (autoconf v2.9)
 dnl
-dnl  $Id: configure.in,v 1.94 1998/01/06 00:27:45 wessels Exp $
+dnl  $Id: configure.in,v 1.95 1998/01/07 21:16:26 wessels Exp $
 dnl
 dnl
 dnl
 AC_INIT(src/main.c)
 AC_CONFIG_HEADER(include/autoconf.h)
-AC_REVISION($Revision: 1.94 $)dnl
+AC_REVISION($Revision: 1.95 $)dnl
 AC_PREFIX_DEFAULT(/usr/local/squid)
 AC_CONFIG_AUX_DIR(aux)
 
@@ -243,7 +243,8 @@ AC_ARG_ENABLE(async_io,
     echo "Async I/O enabled"
     AC_DEFINE(USE_ASYNC_IO)
     ASYNC_OBJS='$(ASYNC_OBJS)'
-    SQUID_PTHREAD_LIB='$(PTHREAD_LIB)'
+    SQUID_PTHREAD_LIB='$(PTHREADLIB)'
+    CFLAGS="$CFLAGS -D_REENTRANT"
   fi
 ])
 AC_SUBST(ASYNC_OBJS)
@@ -273,8 +274,9 @@ AC_ARG_ENABLE(useragent_log,
   fi
 ])
 
-AC_ARG_ENABLE(kill_parent,
-[  --enable-kill-parent    Kill parent on shutdown],
+AC_ARG_ENABLE(kill_parent_hack,
+[  --enable-kill-parent-hack
+                          Kill parent on shutdown],
 [ if test "$enableval" = "yes" ; then
     echo "Kill parent on shutdown"
     AC_DEFINE(KILL_PARENT_OPT)
index ac426e866ef2bf61cfaf870cd0b6c927987d1f07..32631d2d137c8c9c8ff273f536aa93002811e3e8 100644 (file)
@@ -1,7 +1,7 @@
 #
 #  Makefile for the Squid Object Cache server
 #
-#  $Id: Makefile.in,v 1.113 1998/01/07 21:14:24 wessels Exp $
+#  $Id: Makefile.in,v 1.114 1998/01/07 21:16:29 wessels Exp $
 #
 #  Uncomment and customize the following to suit your needs:
 #
@@ -54,7 +54,7 @@ SHELL         = /bin/sh
 
 INCLUDE                = -I. -I../include -I$(srcdir)/../include
 CFLAGS                 = $(AC_CFLAGS) $(INCLUDE) $(DEFINES)
-SQUID_LIBS     = -L../lib $(CRYPTLIB) $(REGEXLIB) @PTHREADLIB@ \
+SQUID_LIBS     = -L../lib $(CRYPTLIB) $(REGEXLIB) @SQUID_PTHREAD_LIB@ \
                  $(SNMPLIB) -lmiscutil $(XTRA_LIBS)
 CLIENT_LIBS    = -L../lib -lmiscutil $(XTRA_LIBS)
 DNSSERVER_LIBS = -L../lib -lmiscutil $(XTRA_LIBS)
index d4122dcda76345b46e021603c97fae9535d834fa..d5a889ac79da2fe831da7f8426e2b3191a177aba 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: ftp.cc,v 1.184 1998/01/05 21:44:41 wessels Exp $
+ * $Id: ftp.cc,v 1.185 1998/01/07 21:16:30 wessels Exp $
  *
  * DEBUG: section 9     File Transfer Protocol (FTP)
  * AUTHOR: Harvest Derived
@@ -502,9 +502,9 @@ static char *
 ftpHtmlifyListEntry(char *line, int flags)
 {
     LOCAL_ARRAY(char, link, 2048 + 40);
+    LOCAL_ARRAY(char, link2, 2048 + 40);
     LOCAL_ARRAY(char, icon, 2048);
     LOCAL_ARRAY(char, html, 8192);
-    char *ename = NULL;
     size_t width = Config.Ftp.list_width;
     ftpListParts *parts;
     if (strlen(line) > 1024) {
@@ -564,7 +564,7 @@ ftpHtmlifyListEntry(char *line, int flags)
            *(parts->showname + width - 0) = '\0';
        }
     }
-    ename = xstrdup(rfc1738_escape(parts->name));
+    
     switch (parts->type) {
     case 'd':
        snprintf(icon, 2048, "<IMG SRC=\"%s%s\" ALT=\"%-6s\">",
@@ -572,7 +572,7 @@ ftpHtmlifyListEntry(char *line, int flags)
            ICON_MENU,
            "[DIR]");
        snprintf(link, 2048, "<A HREF=\"%s/\">%s</A>%s",
-           ename,
+           rfc1738_escape(parts->name),
            parts->showname,
            dots_fill(strlen(parts->showname)));
        snprintf(html, 8192, "%s %s  [%s]\n",
@@ -586,13 +586,17 @@ ftpHtmlifyListEntry(char *line, int flags)
            ICON_LINK,
            "[LINK]");
        snprintf(link, 2048, "<A HREF=\"%s\">%s</A>%s",
-           ename,
+           rfc1738_escape(parts->name),
            parts->showname,
            dots_fill(strlen(parts->showname)));
-       snprintf(html, 8192, "%s %s  [%s]\n",
+       snprintf(link2, 2048, "<A HREF=\"%s\">%s</A>",
+           rfc1738_escape(parts->link),
+           parts->link);
+       snprintf(html, 8192, "%s %s  [%s] -> %s\n",
            icon,
            link,
-           parts->date);
+           parts->date,
+           link2);
        break;
     case '-':
     default:
@@ -601,7 +605,7 @@ ftpHtmlifyListEntry(char *line, int flags)
            mimeGetIcon(parts->name),
            "[FILE]");
        snprintf(link, 2048, "<A HREF=\"%s\">%s</A>%s",
-           ename,
+           rfc1738_escape(parts->name),
            parts->showname,
            dots_fill(strlen(parts->showname)));
        snprintf(html, 8192, "%s %s  [%s] %6dk\n",
@@ -612,7 +616,6 @@ ftpHtmlifyListEntry(char *line, int flags)
        break;
     }
     ftpListPartsFree(&parts);
-    xfree(ename);
     return html;
 }
 
index 56a77c0f5fe6b9149be0871f58b85b0a1481c7be..bce6b8b5161afbbeeac971af9a2731ae35a4aab9 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: main.cc,v 1.204 1998/01/06 18:12:23 wessels Exp $
+ * $Id: main.cc,v 1.205 1998/01/07 21:16:31 wessels Exp $
  *
  * DEBUG: section 1     Startup and Main Loop
  * AUTHOR: Harvest Derived
@@ -465,8 +465,10 @@ mainInitialize(void)
     if (!configured_once)
        writePidFile();         /* write PID file */
 
+#if !(defined(_SQUID_LINUX_) && USE_ASYNC_IO)
     squid_signal(SIGUSR1, rotate_logs, SA_RESTART);
     squid_signal(SIGUSR2, sigusr2_handle, SA_RESTART);
+#endif
     squid_signal(SIGHUP, reconfigure, SA_RESTART);
     squid_signal(SIGTERM, shut_down, SA_NODEFER | SA_RESETHAND | SA_RESTART);
     squid_signal(SIGINT, shut_down, SA_NODEFER | SA_RESETHAND | SA_RESTART);