Re: [bug-gnulib] Re: gettimeofday() for Win32

2006-06-15 Thread Paul Eggert
Martin Lambers <[EMAIL PROTECTED]> writes: > Is there any interest in these changes? Does the patch need > improvements? There's interest, but I haven't had a chance to look at it (I need to get more time :-).

Re: [bug-gnulib] Re: gettimeofday() for Win32

2006-06-15 Thread Martin Lambers
On Thu, 25. May 2006, 21:16:03 +0200, Martin Lambers wrote: > This new version of the patch tests HAVE__FTIME first, so that on native > W32 platforms > void _ftime (struct _timeb *timeptr); > is used instead of > void ftime (struct timeb *timeptr); . Is there any interest in these changes? Does

Re: [bug-gnulib] Re: gettimeofday() for Win32

2006-05-25 Thread Martin Lambers
On Tue, 23. May 2006, 21:44:20 +0200, Martin Lambers wrote: > OK, I added a version for ftime(). Sorry, this version has a problem: Newer versions of MinGW not only have void _ftime (struct _timeb *timeptr); but also void ftime (struct timeb *timeptr); . Thus both HAVE_FTIME and HAVE__FTIME are

Re: [bug-gnulib] Re: [bug-gnulib] Re: gettimeofday() for Win32

2006-05-24 Thread Bruno Haible
Paul Eggert wrote: > Some old SVR4 systems put a one-argument > gettimeofday prototype into their . Also, Solaris 2.4 has > a one-argument prototype for C++ only. The Solaris 2.4 has: #ifdef __cplusplus int gettimeofday(struct timeval *, void *); int settimeofday(struct timeval *, void *); #end

Re: [bug-gnulib] Re: gettimeofday() for Win32

2006-05-23 Thread Martin Lambers
On Tue, 23. May 2006, 14:32:14 +0200, Bruno Haible wrote: > Similar things should be done for systems that have no gettimeofday() > but do have an 'ftime' function and 'struct timeb' declared in > . (Old SysVR2 or SysVR3 systems. Microsoft did not invent this > interface; they only prepended the un

Re: [bug-gnulib] Re: gettimeofday() for Win32

2006-05-23 Thread Paul Eggert
Bruno Haible <[EMAIL PROTECTED]> writes: >> + AC_CACHE_CHECK([for gettimeofday whose signature conforms to POSIX], > > What's the point of checking the signature? The only signatures of > gettimeofday() I've seen are: > > int gettimeofday (struct timeval * tp, ...); > int gettimeofday (st

Re: [bug-gnulib] Re: gettimeofday() for Win32

2006-05-23 Thread Bruno Haible
Hi, Thanks for improving the gettimeofday replacement. > +# if HAVE__FTIME > + > + struct _timeb timebuf; > + > + _ftime (&timebuf); > + tv->tv_sec = timebuf.time; > + tv->tv_usec = timebuf.millitm * 1000; > + > + return 0; > + Similar things should be done for systems that have no gettim

Re: gettimeofday() for Win32

2006-05-22 Thread Martin Lambers
On Sun, 09. Oct 2005, 08:56:50 +0200, Ralf Wildenhues wrote: > If I may, a couple of comments on the code: Thanks! I'm sorry that it took me so long to respond to this. (The original thread is archived here: http://www.mail-archive.com/bug-gnulib%40gnu.org/msg00823.html ) I updated the patch acc

Re: gettimeofday() for Win32

2005-10-09 Thread Ralf Wildenhues
Hi Martin, If I may, a couple of comments on the code: * Martin Lambers wrote on Sat, Oct 08, 2005 at 05:13:25PM CEST: > *snip* > diff -uNr gnulib/lib/gettimeofday.h gnulib-gettimeofday/lib/gettimeofday.h > --- gnulib/lib/gettimeofday.h 1970-01-01 01:00:00.0 +0100 > +++ gnulib-gettimeofda

Re: gettimeofday() for Win32

2005-10-08 Thread Martin Lambers
Thanks for your comments. I tried to follow them and updated the patch. The tests (good gettimeofday, bad gettimeofday, no gettimeofday) still work. I have one question, though: > where this code is removed from AC_FUNC_GETTIMEOFDAY_CLOBBER: > > if test $jm_cv_func_gettimeofday_clobber = yes;

Re: gettimeofday() for Win32

2005-10-07 Thread Paul Eggert
Thanks for bird-dogging this. On further review I have some comments and suggestions. The gettimeofday replacement should use the standard POSIX signature, which uses 'restrict'. See . > +#ifdef _WIN32 > +#include > +#e

Re: gettimeofday() for Win32

2005-10-07 Thread Martin Lambers
On Fri, 02. Sep 2005, 12:11:37 -0700, Paul Eggert wrote: > You don't need to check whether tp is NULL. Gettimeofday can assume > its first arg is NULL. > > Assuming we can resolve the copyright issues it otherwise looks good to me. > (Though I can't comment on the Microsoft Windows stuff.) The p

Re: gettimeofday() for Win32

2005-09-02 Thread Paul Eggert
Martin Lambers <[EMAIL PROTECTED]> writes: > The patch is mostly a recombination of code written by Jim Meyering and > Bruno Haible, so there should by no copyright problem when including > this into gnulib. Hmm, I suspect that it's enough extra work that we'll need papers from you. Would you be

Re: gettimeofday() for Win32

2005-09-02 Thread Martin Lambers
On Fri, 02. Sep 2005, 12:11:37 -0700, Paul Eggert wrote: > Hmm, I suspect that it's enough extra work that we'll need papers from > you. Would you be willing to assign the copyright to the Free Software > Foundation, so that we could install it in gnulib? Yes. > You don't need to check whether

Re: gettimeofday() for Win32

2005-09-02 Thread Martin Lambers
On Fri, 02. Sep 2005, 08:31:26 +0200, Martin Lambers wrote: > The second patch makes the gettime module use gettimeofday > unconditionally. It depended on the gettimeofday module before, and > this small change > - simplifies the code > - improves gettime time resolution from seconds to microsecond

Re: gettimeofday() for Win32

2005-09-02 Thread Martin Lambers
On Thu, 25. Aug 2005, 19:36:23 +0200, Jim Meyering wrote: > Paul Eggert <[EMAIL PROTECTED]> wrote: > > I suspect that he'll say it's OK with him as long as it's no real work > > for him. > > That's accurate :) Then I'd like to propose the following two patches for inclusion. The first is a revis

Re: gettimeofday() for Win32

2005-08-25 Thread Jim Meyering
Paul Eggert <[EMAIL PROTECTED]> wrote: > I suspect that he'll say it's OK with him as long as it's no real work > for him. That's accurate :) ___ bug-gnulib mailing list bug-gnulib@gnu.org http://lists.gnu.org/mailman/listinfo/bug-gnulib

Re: [bug-gnulib] gettimeofday() for Win32

2005-08-25 Thread Paul Eggert
Bruno Haible <[EMAIL PROTECTED]> writes: > What's the right way to fill the struct timezone? Don't fill it in at all. Don't even look at the pointer to it. POSIX says portable applications must always pass NULL, but I wouldn't even rely on that. >> I have two questions: Would you consider inte

Re: [bug-gnulib] gettimeofday() for Win32

2005-08-25 Thread Martin Lambers
On Thu, 25. Aug 2005, 15:32:00 +0200, Bruno Haible wrote: > > If so, how can this be done? > > It can be done by merging your .m4 file with Jim's one, and put a big > #if inside lib/gettimeofday.c. OK, I had no better idea than defining GETTIMEOFDAY_USE_REPLACEMENTS if the replacement functions

Re: [bug-gnulib] gettimeofday() for Win32

2005-08-25 Thread Bruno Haible
Hi, Martin Lambers wrote: > I'd like to provide a gettimeofday() function for systems that do not > have it (at least Win32). > > I already wrote a module that works, see below. But this module > overwrites the existing gettimeofday module. I do not know how to > integrate the changes into the exi

gettimeofday() for Win32

2005-08-24 Thread Martin Lambers
Hi! I'd like to provide a gettimeofday() function for systems that do not have it (at least Win32). I already wrote a module that works, see below. But this module overwrites the existing gettimeofday module. I do not know how to integrate the changes into the existing module because of the auto