W3C Lib Using

Trace Messages and Preprocessor Defines

The Library has a huge amount of trace messages that are very useful when debugging an application. In this section we will have a look at how to use the trace messages and also what preprocessor defines that can be used to modify the behavior of the Library.

Trace Messages

The Library has a huge set of trace messages that can be enabled in various ways. They are often an important help to the application programmer in order to debug an application and this is the reason why they are trated in this User's Guide.

MORE

Preprocessor Defines

Most of the preprocessor defines in the Library are platform dependent that are determined as a result of the BUILD script. However, there are some few defines that on a platform independent basis can change the default behavior of the Library.

HT_REENTRANT
This boolean define should be enabled if the reentrant versions ("*_r") of the system calls should be used. The name of these system calls are currently "*_r", for example strtok_r. The default value is OFF.
HT_SHARED_DISK_CACHE
If the cache can be shared between several clients this will have an effect on the way, update of a document will be done. The default cache implementation of the cache manager does not support this so the default value is NOT defined.
HT_DIRECT_WAIS
This boolean define is enabled by the Makefile.include file as described in section Access Methods. The default value is OFF.
HT_DEFAULT_WAIS_GATEWAY
A constant string value which WAIS gateway to contact if HT_DIRECT_WAIS is not defined and no gateway has been defined using environment variables
HT_FTP_NO_PORT
The FTP module can handle both PASV and PORT when requesting a document from a FTP server. If the application is a proxy server running on top of a firewall machine then PORT is normally not allowed as a firewall does not accept incoming connections on arbitrary ports. This define will disable the use of PORT. The default value is to use PORT if PASV fails.
WWWLIB_SIG
The Library has a very small set of signal handlers whose action most often are simply to ignore the signals. However, due to a bug in the TCP kernel on Solaris and other SVR4 platforms returning a SIG_PIPE signal, some kind of handling is required on these platforms, and the signal handling is enabled by default on these platforms.
HT_TMP_ROOT
The default destination for temporary files if no other destination has been given by the application. Temporary files include files created for external presenters etc. The default value is /tmp which obviously is not suited for large amount of data.
HT_CACHE_ROOT
If the cache is enabled and no cache root directory has been specified then use this as the location. The default value is again /tmp.
HT_NO_RULES
If this flag is enabled then no configuration or rule file is searched for map rules when handling a request even if a rule file has been specified by the application. The default value is OFF
HT_NO_PROXY
If no environment variables are to be searched for gateways or proxies for a request. The default value is OFF


Henrik Frystyk, libwww@w3.org, December 1995