- From: Steinar Bang <sb@metis.no>
- Date: 02 Nov 1999 11:57:02 +0100
- To: www-lib@w3.org
Here are two patches to eliminate linker duplicate symbol warnings on
Win32. The duplicate symbols are caused by makedefs.pl not
understanding C preprocessor #ifdefs.
So what I've done is to put the #ifdefs inside the function bodies of
the offending functions, instead of outside.
Caveat Emptor!
*** HTInet.c 1999/09/06 09:42:30 1.1
--- HTInet.c 1999/11/02 10:48:06 1.2
***************
*** 3,9 ****
**
** (c) COPYRIGHT MIT 1995.
** Please first read the full copyright statement in the file COPYRIGH.
! ** @(#) $Id: HTInet.c,v 1.1 1999/09/06 09:42:30 sb Exp $
**
** This code is in common between client and server sides.
**
--- 3,9 ----
**
** (c) COPYRIGHT MIT 1995.
** Please first read the full copyright statement in the file COPYRIGH.
! ** @(#) $Id: HTInet.c,v 1.2 1999/11/02 10:48:06 sb Exp $
**
** This code is in common between client and server sides.
**
***************
*** 145,153 ****
--- 145,155 ----
** call if the application has its own handlers.
*/
#include <signal.h>
+ #endif /* WWWLIB_SIG */
PUBLIC void HTSetSignal (void)
{
+ #ifdef WWWLIB_SIG
/* On some systems (SYSV) it is necessary to catch the SIGPIPE signal
** when attemting to connect to a remote host where you normally should
** get `connection refused' back
***************
*** 157,168 ****
} else {
HTTRACE(CORE_TRACE, "HTSignal.... Ignoring SIGPIPE\n");
}
- }
#else /* WWWLIB_SIG */
-
- PUBLIC void HTSetSignal (void) { }
-
#endif /* WWWLIB_SIG */
/* ------------------------------------------------------------------------- */
/* HOST NAME FUNCTIONS */
--- 159,167 ----
} else {
HTTRACE(CORE_TRACE, "HTSignal.... Ignoring SIGPIPE\n");
}
#else /* WWWLIB_SIG */
#endif /* WWWLIB_SIG */
+ }
/* ------------------------------------------------------------------------- */
/* HOST NAME FUNCTIONS */
*** HTWAIS.c 1999/09/06 09:42:31 1.1
--- HTWAIS.c 1999/11/02 10:48:06 1.2
***************
*** 3,9 ****
**
** (c) COPYRIGHT MIT 1995.
** Please first read the full copyright statement in the file COPYRIGH.
! ** @(#) $Id: HTWAIS.c,v 1.1 1999/09/06 09:42:31 sb Exp $
**
** This module allows a WWW server or client to read data from a
** remote WAIS server, and provide that data to a WWW client in
--- 3,9 ----
**
** (c) COPYRIGHT MIT 1995.
** Please first read the full copyright statement in the file COPYRIGH.
! ** @(#) $Id: HTWAIS.c,v 1.2 1999/11/02 10:48:06 sb Exp $
**
** This module allows a WWW server or client to read data from a
** remote WAIS server, and provide that data to a WWW client in
***************
*** 62,73 ****
#include "WWWHTML.h"
#include "HTReqMan.h"
! #ifndef HT_DIRECT_WAIS
! PUBLIC int HTLoadWAIS (SOCKET soc, HTRequest* request)
! {
! return HT_ERROR;
! }
! #else
#ifdef HAVE_WAIS_WAIS_H
#include "wais/wais.h"
--- 62,68 ----
#include "WWWHTML.h"
#include "HTReqMan.h"
! #ifdef HT_DIRECT_WAIS
#ifdef HAVE_WAIS_WAIS_H
#include "wais/wais.h"
***************
*** 1372,1380 ****
--- 1367,1380 ----
return status;
}
+ #endif /* HT_DIRECT_WAIS */
+
PUBLIC int HTLoadWAIS (SOCKET soc, HTRequest* request)
{
+ #ifndef HT_DIRECT_WAIS
+ return HT_ERROR;
+ #else
wais_info* theWAISinfo; /* Specific protocol information */
HTNet* net; /* Generic protocol information */
HTParentAnchor* anchor;
***************
*** 1413,1418 ****
/* get it started - ops is ignored */
return HTWAISEvent(soc, theWAISinfo, HTEvent_BEGIN);
- }
-
#endif /* HT_DIRECT_WAIS */
--- 1413,1417 ----
/* get it started - ops is ignored */
return HTWAISEvent(soc, theWAISinfo, HTEvent_BEGIN);
#endif /* HT_DIRECT_WAIS */
+ }
Received on Tuesday, 2 November 1999 05:57:07 UTC