|
From: Geoff A. <gal...@nc...> - 2003-07-28 02:42:26
|
----- Original Message -----
From: "Nicholas Nethercote" <nj...@ca...>
> No... the compiler looks like it's complaining about not knowing the
> "struct timeval" type. This is defined in bits/time.h, which is #included
> in vg_intercept.c via sys/time.h, like so:
>
> #ifdef GLIBC_2_1
> #include <sys/time.h>
> #endif
Thanks for the response. Removing the #ifdef GLIBC_2_1 fixed the problem.
SuSE 7.1 uses glibc 2.2. The config.h for valgrind properly sets GLIBC_2_2:
/* Define to 1 if you're using glibc 2.1.x */
/* #undef GLIBC_2_1 */
/* Define to 1 if you're using glibc 2.2.x */
#define GLIBC_2_2 1
/* Define to 1 if you're using glibc 2.3.x */
/* #undef GLIBC_2_3 */
The POSIX standard states that struct timeval is defined in sys/time.h
(http://www.opengroup.org/onlinepubs/007904975/basedefs/sys/time.h.html), so
don't understand why vg_intercept.c wraps the include of sys/time.h with
#ifdef GLIBC_2_1. Doesn't sys/time.h need to be included on glibc 2.2 and
2.3 systems as well as glibc 2.1 systems? Is this a bug? If not, where is
vg_intercept.c suppose to get struct timeval on glibc 2.2 and 2.3 systems?
Thanks,
Geoff Alexander
|