Re: globals.c->globals.cc

From: Guido Serassio <serassio@dont-contact.us>
Date: Sun, 15 Dec 2002 10:33:18 +0100

Hi Robert,

Il 10.07 15/12/2002 Robert Collins ha scritto:
>I've changed the generation of globals.c to create globals.cc. This
>allows for C++ syntax in headers such as structs.h.
>
>You may find that you need to do the following in your build trees:
>
>rm src/globals.o
>rm src/.deps/globals.Po
>touch src/.deps/globals.Po
>
>before you can build successfully.
>
>Cheers
>Rob
>

There is only a problem:

Microsoft Visual Studio apply "name decoration" or "name mangling" to C++
object files, so, if all global variables defined in globals.c are
referenced from other C++ object files, Squid links fine. But at line 95
in MemPool.c:

/*
  * XXX This is a boundary violation between lib and src.. would be good
  * if it could be solved otherwise, but left for now.
  */
extern time_t squid_curtime;

The result is an "squid_curtime unresolved external" error in MemPool.obj
when linking.

Previously I have resolved the issue compiling globals.c as a C source and
declaring globals.h as extern "C", but now the squid_curtime problem must
be fixed.

Regards

Guido

-
=======================================================
Serassio Guido
Via Albenga, 11/4 10134 - Torino - ITALY
E-mail: guido.serassio@serassio.it
WWW: http://www.serassio.it
Received on Sun Dec 15 2002 - 02:34:35 MST

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:19:01 MST