X-Git-Url: https://pd.if.org/git/?p=pdclib.old;a=blobdiff_plain;f=internals%2F_PDCLIB_int.h;fp=internals%2F_PDCLIB_int.h;h=4477fc1ddb479333fc693001b3ae3a85937b3b26;hp=a46c2dc6c7f93014a58cb85a3949e976891ce821;hb=97dd2fddbdb56005b16a1b0aa19ed15cd77269fc;hpb=263e1e1fae0dcae08d99dc06fd69391ad076f378 diff --git a/internals/_PDCLIB_int.h b/internals/_PDCLIB_int.h index a46c2dc..4477fc1 100644 --- a/internals/_PDCLIB_int.h +++ b/internals/_PDCLIB_int.h @@ -1,4 +1,5 @@ -/* $Id$ */ +#ifndef _PDCLIB_INT_H +#define _PDCLIB_INT_H /* PDCLib internal integer logic <_PDCLIB_int.h> @@ -11,15 +12,8 @@ /* would be considered a bug / missing feature: notify the author(s). */ /* -------------------------------------------------------------------------- */ -#ifndef _PDCLIB_CONFIG_H -#define _PDCLIB_CONFIG_H _PDCLIB_CONFIG_H #include <_PDCLIB_config.h> -#endif - -#ifndef _PDCLIB_AUX_H -#define _PDCLIB_AUX_H _PDCLIB_AUX_H #include <_PDCLIB_aux.h> -#endif /* null pointer constant */ #define _PDCLIB_NULL 0 @@ -254,6 +248,36 @@ typedef unsigned _PDCLIB_intmax _PDCLIB_uintmax_t; #define _PDCLIB_INTMAX_C( value ) _PDCLIB_concat( value, _PDCLIB_INTMAX_LITERAL ) #define _PDCLIB_UINTMAX_C( value ) _PDCLIB_concat( value, _PDCLIB_concat( u, _PDCLIB_INTMAX_LITERAL ) ) +/* -------------------------------------------------------------------------- */ +/* Various internals */ +/* -------------------------------------------------------------------------- */ + +typedef _PDCLIB_time _PDCLIB_time_t; +typedef _PDCLIB_clock _PDCLIB_clock_t; + +#if !defined(_PDCLIB_DEFINE_STRUCT_TIMESPEC) +#define _PDCLIB_DEFINE_STRUCT_TIMESPEC() \ + struct timespec { \ + time_t tv_sec; \ + long tv_nsec; \ + }; +#endif + +#if !defined(_PDCLIB_DEFINE_STRUCT_TM) +#define _PDCLIB_DEFINE_STRUCT_TM() \ + struct tm { \ + int tm_sec; \ + int tm_min; \ + int tm_hour; \ + int tm_mday; \ + int tm_mon; \ + int tm_year; \ + int tm_wday; \ + int tm_yday; \ + int tm_isdst; \ + }; +#endif + /* -------------------------------------------------------------------------- */ /* Various internals */ /* -------------------------------------------------------------------------- */ @@ -442,3 +466,4 @@ struct _PDCLIB_ctype_t unsigned char collation; }; +#endif