On Wed, 24 Jan 2001, Guy Harris wrote:
> Hmm. Line 970 is
>
> for (smiRange = smiGetFirstRange(smiType->module, smiType->name);
True.
> which is code used only if "LIBSMI_API_V1" is defined - but you have
> libsmi-0.2-50 installed, so it presumably has the V2 API, not the V1
> API.
I have no clue. Here's what I have had before removing libsmi, and the
.so versions suggest that it's indeed V2.
/usr/lib/libsmi.a
/usr/lib/libsmi.la
/usr/lib/libsmi.so
/usr/lib/libsmi.so.2
/usr/lib/libsmi.so.2.0.1
> but, at least in the libsmi 0.2 source I have here, no header file
> defines SMI_VERSION_MAJOR or SMI_VERSION_MINOR, unless I'm missing
> something, so I'm not sure how that test would work.
Not having any clues of libsmi, a simple AC_TRY_COMPILE should be able
to figure the correct parameters, which may be a better idea than
guessing #defines in third-party libraries. "Works in leafnode" (which
is to figure old vs. new pcre_compile and pcre_exec argument style).
> That's done in AC_LBL_TYPE_SIGNAL in "aclocal.m4"; for some unknown
> reason, it "prefer[s] sigset() to sigaction()", as the comment says.
> The only reason I can think of is that it has a simpler calling
> sequence, but "sigaction()" is in POSIX, so I'd be inclined to prefer
> it.
Sigset seems to come from the Unix98 part in signal.h, so I assume it's
in the C library and found regardless.
#ifdef __USE_UNIX98
/* Simplified interface for signal management. */
/* Add SIG to the calling process' signal mask. */
extern int sighold __P ((int __sig));
/* Remove SIG from the calling process' signal mask. */
extern int sigrelse __P ((int __sig));
/* Set the disposition of SIG to SIG_IGN. */
extern int sigignore __P ((int __sig));
/* Set the disposition of SIG. */
extern __sighandler_t sigset __P ((int __sig, __sighandler_t __disp));
/* Some of the functions for handling signals in threaded programs must
be defined here. */
# include <bits/sigthread.h>
#endif /* use Unix98 */
> However, where is "signal()" declared in Linux header files? The glibc
> 2.1.2 "signal.h" header appears to define "sigset()" as returning a
> "__sighandler_t", which is a function pointer, and "setsignal.c"
> includes <signal.h>, so it sounds as if it *should* think "sigset()"
> returns a pointer.
Running cscope against the tcpdump 3.6.1 sources, I figure it's this (glibc
2.1.3, if that matters) in /usr/include/signal.h:
/* The X/Open definition of `signal' specifies the SVID semantic. Use
the additional function `sysv_signal' when X/Open compatibility is
requested. */
extern __sighandler_t __sysv_signal __P ((int __sig,
»·······»·······»·······»·······»······· __sighandler_t __handler));
#ifdef __USE_GNU
extern __sighandler_t sysv_signal __P ((int __sig, __sighandler_t __handler));
#endif
/* Set the handler for the signal SIG to HANDLER, returning the old
handler, or SIG_ERR on error.
By default `signal' has the BSD semantic. */
#ifdef __USE_BSD
extern __sighandler_t signal __P ((int __sig, __sighandler_t __handler));
#else
/* Make sure the used `signal' implementation is the SVID version. */
# ifdef __REDIRECT
extern __sighandler_t __REDIRECT (signal,
»·······»·······»·······»······· __P ((int __sig, __sighandler_t __handler)),
»·······»·······»·······»······· __sysv_signal);
# else
# define signal __sysv_signal
# endif
#endif
#ifdef __USE_XOPEN
/* The X/Open definition of `signal' conflicts with the BSD version.
So they defined another function `bsd_signal'. */
extern __sighandler_t bsd_signal __P ((int __sig, __sighandler_t __handler));
#endif
--
Matthias Andree
-
This is the TCPDUMP workers list. It is archived at
http://www.tcpdump.org/lists/workers/index.html
To unsubscribe use mailto:[EMAIL PROTECTED]?body=unsubscribe