Blame lib/util.h

Packit 022b05
/*
Packit 022b05
 * util.h --
Packit 022b05
 *
Packit 022b05
 *      Misc utility functions.
Packit 022b05
 *
Packit 022b05
 * Copyright (c) 1999 Frank Strauss, Technical University of Braunschweig.
Packit 022b05
 *
Packit 022b05
 * See the file "COPYING" for information on usage and redistribution
Packit 022b05
 * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
Packit 022b05
 *
Packit 022b05
 * @(#) $Id: util.h 8062 2008-04-16 14:25:53Z schoenw $
Packit 022b05
 */
Packit 022b05
Packit 022b05
#ifndef _UTIL_H
Packit 022b05
#define _UTIL_H
Packit 022b05
Packit 022b05
#include <stdlib.h>
Packit 022b05
#include <time.h>
Packit 022b05
Packit 022b05
#include "smi.h"
Packit 022b05
#include "error.h"
Packit 022b05
#include "parser-smi.h"
Packit 022b05
Packit 022b05
Packit 022b05
Packit 022b05
#ifdef __CHECKER__
Packit 022b05
#undef HAVE_TIMEGM
Packit 022b05
#undef HAVE_STRTOULL
Packit 022b05
#undef HAVE_STRTOUQ
Packit 022b05
#undef HAVE_STRTOLL
Packit 022b05
#undef HAVE_STRTOQ
Packit 022b05
#endif
Packit 022b05
Packit 022b05
/*
Packit 022b05
 * Make sure we have strtoull() and strtoll() on this system.
Packit 022b05
 */
Packit 022b05
Packit 022b05
#ifndef HAVE_STRTOULL
Packit 022b05
#ifdef HAVE_STRTOUQ
Packit 022b05
#define strtoull strtouq
Packit 022b05
#else
Packit 022b05
#define strtoull strtoul	/* TODO */
Packit 022b05
#endif
Packit 022b05
#endif
Packit 022b05
Packit 022b05
#ifndef HAVE_STRTOLL
Packit 022b05
#ifdef HAVE_STRTOQ
Packit 022b05
#define strtoll strtoq
Packit 022b05
#else
Packit 022b05
#define strtoll strtol
Packit 022b05
#endif
Packit 022b05
#endif
Packit 022b05
Packit 022b05
extern int smiIsPath(const char *s);
Packit 022b05
Packit 022b05
#ifndef HAVE_TIMEGM
Packit 022b05
time_t timegm(struct tm *tm);
Packit 022b05
#endif
Packit 022b05
Packit 022b05
int smiTypeDerivedFrom(Type *typePtr, Type *parentTypePtr);
Packit 022b05
Packit 022b05
#endif /* _UTIL_H */
Packit 022b05