1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63
|
/*
* util.h --
*
* Misc utility functions.
*
* Copyright (c) 1999 Frank Strauss, Technical University of Braunschweig.
*
* See the file "COPYING" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
* @(#) $Id: util.h 8062 2008-04-16 14:25:53Z schoenw $
*/
#ifndef _UTIL_H
#define _UTIL_H
#include <stdlib.h>
#include <time.h>
#include "smi.h"
#include "error.h"
#include "parser-smi.h"
#ifdef __CHECKER__
#undef HAVE_TIMEGM
#undef HAVE_STRTOULL
#undef HAVE_STRTOUQ
#undef HAVE_STRTOLL
#undef HAVE_STRTOQ
#endif
/*
* Make sure we have strtoull() and strtoll() on this system.
*/
#ifndef HAVE_STRTOULL
#ifdef HAVE_STRTOUQ
#define strtoull strtouq
#else
#define strtoull strtoul /* TODO */
#endif
#endif
#ifndef HAVE_STRTOLL
#ifdef HAVE_STRTOQ
#define strtoll strtoq
#else
#define strtoll strtol
#endif
#endif
extern int smiIsPath(const char *s);
#ifndef HAVE_TIMEGM
time_t timegm(struct tm *tm);
#endif
int smiTypeDerivedFrom(Type *typePtr, Type *parentTypePtr);
#endif /* _UTIL_H */
|