2 * dutil.c - AIX utility functions whose compilation conflicts with the
3 * general header file tree defined by lsof.h and dlsof.h -- e.g.,
4 * the conflict between <time.h> and <sys/time.h> for the time(2)
5 * and localtime(3) functions
13 * Copyright 2008 Purdue Research Foundation, West Lafayette, Indiana
14 * 47907. All rights reserved.
16 * Written by Victor A. Abell
18 * This software is not subject to any license of the American Telephone
19 * and Telegraph Company or the Regents of the University of California.
21 * Permission is granted to anyone to use this software for any purpose on
22 * any computer system, and to alter it and redistribute it freely, subject
23 * to the following restrictions:
25 * 1. Neither the authors nor Purdue University are responsible for any
26 * consequences of the use of this software.
28 * 2. The origin of this software must not be misrepresented, either by
29 * explicit claim or by omission. Credit to the authors and Purdue
30 * University must appear in documentation and sources.
32 * 3. Altered versions must be plainly marked as such, and must not be
33 * misrepresented as being the original software.
35 * 4. This notice may not be removed or altered.
40 static char copyright[] =
41 "@(#) Copyright 2008 Purdue Research Foundation.\nAll rights reserved.\n";
42 static char *rcsid = "$Id: util.c,v 1.1 2008/04/01 11:56:53 abe Exp $";
45 #if defined(HAS_STRFTIME)
47 #endif /* defined(HAS_STRFTIME) */
51 * util_strftime() -- utility function to call strftime(3) without header
56 util_strftime(fmtr, fmtl, fmt)
57 char *fmtr; /* format output receiver */
58 int fmtl; /* sizeof(*fmtr) */
59 char *fmt; /* format */
62 #if defined(HAS_STRFTIME)
66 tm = time((time_t *)NULL);
68 return(strftime(fmtr, fmtl, fmt, lt));
69 #else /* !defined(HAS_STRFTIME) */
71 #endif /* defined(HAS_STRFTIME) */