Branch: Tag:

2008-11-05

2008-11-05 18:19:49 by Martin Stjernholm <mast@lysator.liu.se>

Generalized the TOSTR macro by moving it to roxen.h.

Rev: server/etc/include/roxen.h:1.31
Rev: server/protocols/http.pike:1.568

2:   // Modified by Francesco Chemolli to add throttling capabilities.   // Copyright © 1996 - 2004, Roxen IS.    - constant cvs_version = "$Id: http.pike,v 1.567 2008/10/10 14:46:12 mast Exp $"; + constant cvs_version = "$Id: http.pike,v 1.568 2008/11/05 18:19:49 mast Exp $";   // #define REQUEST_DEBUG   #define MAGIC_ERROR   
13:   #endif      // HTTP protocol module. - #include <config.h> + #include <roxen.h>   #define TIMER_PREFIX "http:"   #include <timers.h>   
52:   #define MARK_FD(X) do {} while (0)   #endif    - #define TOSTR(X) #X - #define TOSTR2(X) TOSTR(X) -  +    #ifdef CONNECTION_DEBUG   // Currently only used by CONNECTION_DEBUG to label each message with   // the fd.
331: Inside #if defined(CONNECTION_DEBUG)
   if(stringp(what)) {   #ifdef CONNECTION_DEBUG    if (connection_debug_verbose - #if TOSTR2(CONNECTION_DEBUG) != "1" + #if TOSTR(CONNECTION_DEBUG) != "1"    // CONNECTION_DEBUG may be defined to something like "text/"    // to see the response content for all content types with that    // prefix, only headers are shown otherwise. -  || has_prefix(file->type || "", TOSTR2(CONNECTION_DEBUG)) +  || has_prefix(file->type || "", TOSTR(CONNECTION_DEBUG))   #endif    )    werror ("HTTP[%s]: Response (length %d) ===============================\n"