Artifact 3a933ccdc5a7b287352bfd289c78b6876fda8d6b:
- File compat/gettod.c — part of check-in [2e5b18c85c] at 2004-04-06 22:25:46 on branch trunk — Patch 922727 committed. Implements three changes: * generic/tclInt.h: Reworked the Tcl header files into a clean * unix/tclUnixPort.h: hierarchy where tcl.h < tclPort.h < tclInt.h * win/tclWinInt.h: and every C source file should #include * win/tclWinPort.h: at most one of those files to satisfy its declaration needs. tclWinInt.h and tclWinPort.h also better organized so that tclWinPort.h includes the Windows implementation of cross-platform declarations, while tclWinInt.h makes declarations that are available on Windows only. * generic/tclBinary.c (TCL_NO_MATH): Deleted the generic/tclMath.h * generic/tclMath.h (removed): header file. The internal Tcl * macosx/Makefile (PRIVATE_HEADERS): header, tclInt.h, has a * win/tcl.dsp: #include <math.h> directly, and file external to Tcl needing libm should do the same. * win/Makefile.in (WIN_OBJS): Deleted the win/tclWinMtherr.c file. * win/makefile.bc (TCLOBJS): It's a vestige from matherr() days * win/makefile.vc (TCLOBJS): gone by. * win/tcl.dsp: * win/tclWinMtherr.c (removed): (user: dgp, size: 627) [annotate] [blame] [check-ins using]
/* * gettod.c -- * * This file provides the gettimeofday function on systems * that only have the System V ftime function. * * Copyright (c) 1995 Sun Microsystems, Inc. * * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * * RCS: @(#) $Id: gettod.c,v 1.3 2004/04/06 22:25:47 dgp Exp $ */ #include "tclPort.h" #include <sys/timeb.h> #undef timezone int gettimeofday(tp, tz) struct timeval *tp; struct timezone *tz; { struct timeb t; ftime(&t); tp->tv_sec = t.time; tp->tv_usec = t. millitm * 1000; return 0; }