W3C libwww 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 large 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.

DocumentationAdding and Deleting Trace Messages

Preprocessor Defines

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

HT_REENTRANT - defined using the configure script
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_DIRECT_WAIS - defined using the configure script
LInking to the freeWAIS library. The default value is OFF.
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
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.
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.
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.
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.

Henrik Frystyk Nielsen, libwww@w3.org,
@(#) $Id: Flags.html,v 1.15 1996/12/09 03:23:52 jigsaw Exp $