Ethereal-dev: [Ethereal-dev] text2pcap.c: strptime

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: Gilbert Ramirez <gram@xxxxxxxxxxxxxxx>
Date: Tue, 29 Jan 2002 11:08:13 -0600
On my Debian Linux system, in order for <time.h> to define
strptime(), one has to define _XOPEN_SOURCE. Indeed, the
man page for strptime says so:


NAME
       strptime  -  convert  a string representation of time to a
       time tm structure

SYNOPSIS
       #define _XOPEN_SOURCE /* glibc2 needs this */
       #include <time.h>

       char *strptime(const char *s, const char  *format,  struct
       tm *tm);

I could just define that before the #include <time.h>? Or should
there be some autoconf-check to see if that is necessary? Any
thoughts? If there are no hesitations, I'll just add:

#define _XOPEN_SOURCE

to text2pcap.c

--gilbert