]> granicus.if.org Git - postgresql/blob - src/include/c.h
Reverse out macro fix for the time being.
[postgresql] / src / include / c.h
1 /*-------------------------------------------------------------------------
2  *
3  * c.h
4  *        Fundamental C definitions.  This is included by every .c file in
5  *        postgres.
6  *
7  *
8  * Portions Copyright (c) 1996-2000, PostgreSQL, Inc
9  * Portions Copyright (c) 1994, Regents of the University of California
10  *
11  * $Id: c.h,v 1.68 2000/04/12 05:29:10 momjian Exp $
12  *
13  *-------------------------------------------------------------------------
14  */
15 /*
16  *       TABLE OF CONTENTS
17  *
18  *              When adding stuff to this file, please try to put stuff
19  *              into the relevant section, or add new sections as appropriate.
20  *
21  *        section       description
22  *        -------       ------------------------------------------------
23  *              1)              bool, true, false, TRUE, FALSE, NULL
24  *              2)              non-ansi C definitions:
25  *                              type prefixes: const, signed, volatile, inline
26  *                              cpp magic macros
27  *              3)              standard system types
28  *              4)              datum type
29  *              5)              IsValid macros for system types
30  *              6)              offsetof, lengthof, endof
31  *              7)              exception handling definitions, Assert, Trap, etc macros
32  *              8)              Min, Max, Abs, StrNCpy macros
33  *              9)              externs
34  *              10)             Berkeley-specific defs
35  *              11)             system-specific hacks
36  *
37  * ----------------------------------------------------------------
38  */
39 #ifndef C_H
40 #define C_H
41
42 /* We have to include stdlib.h here because it defines many of these macros
43    on some platforms, and we only want our definitions used if stdlib.h doesn't
44    have its own.  The same goes for stddef and stdarg if present.
45 */
46
47 #include "config.h"
48
49
50 #include <stdio.h>
51 #include <stdlib.h>
52 #include <string.h>
53 #ifdef STDC_HEADERS
54 #include <stddef.h>
55 #include <stdarg.h>
56 #endif
57
58 #ifdef __CYGWIN32__
59 #include <errno.h>
60 #endif
61
62 /* ----------------------------------------------------------------
63  *                              Section 1:      bool, true, false, TRUE, FALSE, NULL
64  * ----------------------------------------------------------------
65  */
66 /*
67  * bool
68  *              Boolean value, either true or false.
69  *
70  */
71 #ifndef __cplusplus
72 #ifndef bool
73 typedef char bool;
74
75 #endif   /* ndef bool */
76 #endif   /* not C++ */
77 #ifndef true
78 #define true    ((bool) 1)
79 #endif
80 #ifndef false
81 #define false   ((bool) 0)
82 #endif
83 typedef bool *BoolPtr;
84
85 #ifndef TRUE
86 #define TRUE    1
87 #endif   /* TRUE */
88
89 #ifndef FALSE
90 #define FALSE   0
91 #endif   /* FALSE */
92
93 /*
94  * NULL
95  *              Null pointer.
96  */
97 #ifndef NULL
98 #define NULL    ((void *) 0)
99 #endif   /* !defined(NULL) */
100
101 /* ----------------------------------------------------------------
102  *                              Section 2: non-ansi C definitions:
103  *
104  *                              type prefixes: const, signed, volatile, inline
105  *                              cpp magic macros
106  * ----------------------------------------------------------------
107  */
108
109 /*
110  * CppAsString
111  *              Convert the argument to a string, using the C preprocessor.
112  * CppConcat
113  *              Concatenate two arguments together, using the C preprocessor.
114  *
115  * Note: the standard Autoconf macro AC_C_STRINGIZE actually only checks
116  * whether #identifier works, but if we have that we likely have ## too.
117  */
118 #if defined(HAVE_STRINGIZE)
119
120 #define CppAsString(identifier) #identifier
121 #define CppConcat(x, y)                 x##y
122
123 #else                                                   /* !HAVE_STRINGIZE */
124
125 #define CppAsString(identifier) "identifier"
126
127 /*
128  * CppIdentity -- On Reiser based cpp's this is used to concatenate
129  *              two tokens.  That is
130  *                              CppIdentity(A)B ==> AB
131  *              We renamed it to _private_CppIdentity because it should not
132  *              be referenced outside this file.  On other cpp's it
133  *              produces  A  B.
134  */
135 #define _priv_CppIdentity(x)x
136 #define CppConcat(x, y)                 _priv_CppIdentity(x)y
137
138 #endif   /* !HAVE_STRINGIZE */
139
140 /*
141  * dummyret is used to set return values in macros that use ?: to make
142  * assignments.  gcc wants these to be void, other compilers like char
143  */
144 #ifdef __GNUC__                                 /* GNU cc */
145 #define dummyret        void
146 #else
147 #define dummyret        char
148 #endif
149
150 /* ----------------------------------------------------------------
151  *                              Section 3:      standard system types
152  * ----------------------------------------------------------------
153  */
154
155 /*
156  * Pointer
157  *              Variable holding address of any memory resident object.
158  *
159  *              XXX Pointer arithmetic is done with this, so it can't be void *
160  *              under "true" ANSI compilers.
161  */
162 typedef char *Pointer;
163
164 /*
165  * intN
166  *              Signed integer, EXACTLY N BITS IN SIZE,
167  *              used for numerical computations and the
168  *              frontend/backend protocol.
169  */
170 typedef signed char int8;               /* == 8 bits */
171 typedef signed short int16;             /* == 16 bits */
172 typedef signed int int32;               /* == 32 bits */
173
174 /*
175  * uintN
176  *              Unsigned integer, EXACTLY N BITS IN SIZE,
177  *              used for numerical computations and the
178  *              frontend/backend protocol.
179  */
180 typedef unsigned char uint8;    /* == 8 bits */
181 typedef unsigned short uint16;  /* == 16 bits */
182 typedef unsigned int uint32;    /* == 32 bits */
183
184 /*
185  * floatN
186  *              Floating point number, AT LEAST N BITS IN SIZE,
187  *              used for numerical computations.
188  *
189  *              Since sizeof(floatN) may be > sizeof(char *), always pass
190  *              floatN by reference.
191  */
192 typedef float float32data;
193 typedef double float64data;
194 typedef float *float32;
195 typedef double *float64;
196
197 /*
198  * boolN
199  *              Boolean value, AT LEAST N BITS IN SIZE.
200  */
201 typedef uint8 bool8;                    /* >= 8 bits */
202 typedef uint16 bool16;                  /* >= 16 bits */
203 typedef uint32 bool32;                  /* >= 32 bits */
204
205 /*
206  * bitsN
207  *              Unit of bitwise operation, AT LEAST N BITS IN SIZE.
208  */
209 typedef uint8 bits8;                    /* >= 8 bits */
210 typedef uint16 bits16;                  /* >= 16 bits */
211 typedef uint32 bits32;                  /* >= 32 bits */
212
213 /*
214  * wordN
215  *              Unit of storage, AT LEAST N BITS IN SIZE,
216  *              used to fetch/store data.
217  */
218 typedef uint8 word8;                    /* >= 8 bits */
219 typedef uint16 word16;                  /* >= 16 bits */
220 typedef uint32 word32;                  /* >= 32 bits */
221
222 /*
223  * Size
224  *              Size of any memory resident object, as returned by sizeof.
225  */
226 typedef size_t Size;
227
228 /*
229  * Index
230  *              Index into any memory resident array.
231  *
232  * Note:
233  *              Indices are non negative.
234  */
235 typedef unsigned int Index;
236
237 #define MAXDIM 6
238 typedef struct
239 {
240         int                     indx[MAXDIM];
241 } IntArray;
242
243 /*
244  * Offset
245  *              Offset into any memory resident array.
246  *
247  * Note:
248  *              This differs from an Index in that an Index is always
249  *              non negative, whereas Offset may be negative.
250  */
251 typedef signed int Offset;
252
253 /* ----------------------------------------------------------------
254  *                              Section 4:      datum type + support macros
255  * ----------------------------------------------------------------
256  */
257 /*
258  * datum.h
259  *              POSTGRES abstract data type datum representation definitions.
260  *
261  * Note:
262  *
263  * Port Notes:
264  *      Postgres makes the following assumption about machines:
265  *
266  *      sizeof(Datum) == sizeof(long) >= sizeof(void *) >= 4
267  *
268  *      Postgres also assumes that
269  *
270  *      sizeof(char) == 1
271  *
272  *      and that
273  *
274  *      sizeof(short) == 2
275  *
276  *      If your machine meets these requirements, Datums should also be checked
277  *      to see if the positioning is correct.
278  */
279
280 typedef unsigned long Datum;    /* XXX sizeof(long) >= sizeof(void *) */
281 typedef Datum *DatumPtr;
282
283 #define GET_1_BYTE(datum)       (((Datum) (datum)) & 0x000000ff)
284 #define GET_2_BYTES(datum)      (((Datum) (datum)) & 0x0000ffff)
285 #define GET_4_BYTES(datum)      (((Datum) (datum)) & 0xffffffff)
286 #define SET_1_BYTE(value)       (((Datum) (value)) & 0x000000ff)
287 #define SET_2_BYTES(value)      (((Datum) (value)) & 0x0000ffff)
288 #define SET_4_BYTES(value)      (((Datum) (value)) & 0xffffffff)
289
290 /*
291  * DatumGetChar
292  *              Returns character value of a datum.
293  */
294
295 #define DatumGetChar(X) ((char) GET_1_BYTE(X))
296
297 /*
298  * CharGetDatum
299  *              Returns datum representation for a character.
300  */
301
302 #define CharGetDatum(X) ((Datum) SET_1_BYTE(X))
303
304 /*
305  * Int8GetDatum
306  *              Returns datum representation for an 8-bit integer.
307  */
308
309 #define Int8GetDatum(X) ((Datum) SET_1_BYTE(X))
310
311 /*
312  * DatumGetUInt8
313  *              Returns 8-bit unsigned integer value of a datum.
314  */
315
316 #define DatumGetUInt8(X) ((uint8) GET_1_BYTE(X))
317
318 /*
319  * UInt8GetDatum
320  *              Returns datum representation for an 8-bit unsigned integer.
321  */
322
323 #define UInt8GetDatum(X) ((Datum) SET_1_BYTE(X))
324
325 /*
326  * DatumGetInt16
327  *              Returns 16-bit integer value of a datum.
328  */
329
330 #define DatumGetInt16(X) ((int16) GET_2_BYTES(X))
331
332 /*
333  * Int16GetDatum
334  *              Returns datum representation for a 16-bit integer.
335  */
336
337 #define Int16GetDatum(X) ((Datum) SET_2_BYTES(X))
338
339 /*
340  * DatumGetUInt16
341  *              Returns 16-bit unsigned integer value of a datum.
342  */
343
344 #define DatumGetUInt16(X) ((uint16) GET_2_BYTES(X))
345
346 /*
347  * UInt16GetDatum
348  *              Returns datum representation for a 16-bit unsigned integer.
349  */
350
351 #define UInt16GetDatum(X) ((Datum) SET_2_BYTES(X))
352
353 /*
354  * DatumGetInt32
355  *              Returns 32-bit integer value of a datum.
356  */
357
358 #define DatumGetInt32(X) ((int32) GET_4_BYTES(X))
359
360 /*
361  * Int32GetDatum
362  *              Returns datum representation for a 32-bit integer.
363  */
364
365 #define Int32GetDatum(X) ((Datum) SET_4_BYTES(X))
366
367 /*
368  * DatumGetUInt32
369  *              Returns 32-bit unsigned integer value of a datum.
370  */
371
372 #define DatumGetUInt32(X) ((uint32) GET_4_BYTES(X))
373
374 /*
375  * UInt32GetDatum
376  *              Returns datum representation for a 32-bit unsigned integer.
377  */
378
379 #define UInt32GetDatum(X) ((Datum) SET_4_BYTES(X))
380
381 /*
382  * DatumGetObjectId
383  *              Returns object identifier value of a datum.
384  */
385
386 #define DatumGetObjectId(X) ((Oid) GET_4_BYTES(X))
387
388 /*
389  * ObjectIdGetDatum
390  *              Returns datum representation for an object identifier.
391  */
392
393 #define ObjectIdGetDatum(X) ((Datum) SET_4_BYTES(X))
394
395 /*
396  * DatumGetPointer
397  *              Returns pointer value of a datum.
398  */
399
400 #define DatumGetPointer(X) ((Pointer) (X))
401
402 /*
403  * PointerGetDatum
404  *              Returns datum representation for a pointer.
405  */
406
407 #define PointerGetDatum(X) ((Datum) (X))
408
409 /*
410  * DatumGetName
411  *              Returns name value of a datum.
412  */
413
414 #define DatumGetName(X) ((Name) DatumGetPointer((Datum) (X)))
415
416 /*
417  * NameGetDatum
418  *              Returns datum representation for a name.
419  */
420
421 #define NameGetDatum(X) PointerGetDatum((Pointer) (X))
422
423
424 /*
425  * DatumGetFloat32
426  *              Returns 32-bit floating point value of a datum.
427  *              This is really a pointer, of course.
428  */
429
430 #define DatumGetFloat32(X) ((float32) DatumGetPointer(X))
431
432 /*
433  * Float32GetDatum
434  *              Returns datum representation for a 32-bit floating point number.
435  *              This is really a pointer, of course.
436  */
437
438 #define Float32GetDatum(X) PointerGetDatum((Pointer) (X))
439
440 /*
441  * DatumGetFloat64
442  *              Returns 64-bit floating point value of a datum.
443  *              This is really a pointer, of course.
444  */
445
446 #define DatumGetFloat64(X) ((float64) DatumGetPointer(X))
447
448 /*
449  * Float64GetDatum
450  *              Returns datum representation for a 64-bit floating point number.
451  *              This is really a pointer, of course.
452  */
453
454 #define Float64GetDatum(X) PointerGetDatum((Pointer) (X))
455
456 /* ----------------------------------------------------------------
457  *                              Section 5:      IsValid macros for system types
458  * ----------------------------------------------------------------
459  */
460 /*
461  * BoolIsValid
462  *              True iff bool is valid.
463  */
464 #define BoolIsValid(boolean)    ((boolean) == false || (boolean) == true)
465
466 /*
467  * PointerIsValid
468  *              True iff pointer is valid.
469  */
470 #define PointerIsValid(pointer) ((void*)(pointer) != NULL)
471
472 /*
473  * PointerIsAligned
474  *              True iff pointer is properly aligned to point to the given type.
475  */
476 #define PointerIsAligned(pointer, type) \
477                 (((long)(pointer) % (sizeof (type))) == 0)
478
479 /* ----------------------------------------------------------------
480  *                              Section 6:      offsetof, lengthof, endof
481  * ----------------------------------------------------------------
482  */
483 /*
484  * offsetof
485  *              Offset of a structure/union field within that structure/union.
486  *
487  *              XXX This is supposed to be part of stddef.h, but isn't on
488  *              some systems (like SunOS 4).
489  */
490 #ifndef offsetof
491 #define offsetof(type, field)   ((long) &((type *)0)->field)
492 #endif   /* offsetof */
493
494 /*
495  * lengthof
496  *              Number of elements in an array.
497  */
498 #define lengthof(array) (sizeof (array) / sizeof ((array)[0]))
499
500 /*
501  * endof
502  *              Address of the element one past the last in an array.
503  */
504 #define endof(array)    (&array[lengthof(array)])
505
506 /* ----------------------------------------------------------------
507  *                              Section 7:      exception handling definitions
508  *                                                      Assert, Trap, etc macros
509  * ----------------------------------------------------------------
510  */
511 /*
512  * Exception Handling definitions
513  */
514
515 typedef char *ExcMessage;
516 typedef struct Exception
517 {
518         ExcMessage      message;
519 } Exception;
520
521 /*
522  * USE_ASSERT_CHECKING, if defined, turns on all the assertions.
523  * - plai  9/5/90
524  *
525  * It should _NOT_ be defined in releases or in benchmark copies
526  */
527
528 /*
529  * Trap
530  *              Generates an exception if the given condition is true.
531  *
532  */
533 #define Trap(condition, exception) \
534                 { if ((assert_enabled) && (condition)) \
535                                 ExceptionalCondition(CppAsString(condition), &(exception), \
536                                                 (char*)NULL, __FILE__, __LINE__); }
537
538 /*
539  *      TrapMacro is the same as Trap but it's intended for use in macros:
540  *
541  *              #define foo(x) (AssertM(x != 0) && bar(x))
542  *
543  *      Isn't CPP fun?
544  */
545 #define TrapMacro(condition, exception) \
546         ((bool) ((! assert_enabled) || ! (condition) || \
547                          (ExceptionalCondition(CppAsString(condition), \
548                                                                   &(exception), \
549                                                                   (char*) NULL, __FILE__, __LINE__))))
550
551 #ifndef USE_ASSERT_CHECKING
552 #define Assert(condition)
553 #define AssertMacro(condition)  ((void)true)
554 #define AssertArg(condition)
555 #define AssertState(condition)
556 #define assert_enabled 0
557 #else
558 #define Assert(condition) \
559                 Trap(!(condition), FailedAssertion)
560
561 #define AssertMacro(condition) \
562                 ((void) TrapMacro(!(condition), FailedAssertion))
563
564 #define AssertArg(condition) \
565                 Trap(!(condition), BadArg)
566
567 #define AssertState(condition) \
568                 Trap(!(condition), BadState)
569
570 extern int      assert_enabled;
571
572 #endif   /* USE_ASSERT_CHECKING */
573
574 /*
575  * LogTrap
576  *              Generates an exception with a message if the given condition is true.
577  *
578  */
579 #define LogTrap(condition, exception, printArgs) \
580                 { if ((assert_enabled) && (condition)) \
581                                 ExceptionalCondition(CppAsString(condition), &(exception), \
582                                                 vararg_format printArgs, __FILE__, __LINE__); }
583
584 /*
585  *      LogTrapMacro is the same as LogTrap but it's intended for use in macros:
586  *
587  *              #define foo(x) (LogAssertMacro(x != 0, "yow!") && bar(x))
588  */
589 #define LogTrapMacro(condition, exception, printArgs) \
590         ((bool) ((! assert_enabled) || ! (condition) || \
591                          (ExceptionalCondition(CppAsString(condition), \
592                                                                    &(exception), \
593                                                                    vararg_format printArgs, __FILE__, __LINE__))))
594
595 #ifndef USE_ASSERT_CHECKING
596 #define LogAssert(condition, printArgs)
597 #define LogAssertMacro(condition, printArgs) true
598 #define LogAssertArg(condition, printArgs)
599 #define LogAssertState(condition, printArgs)
600 #else
601 #define LogAssert(condition, printArgs) \
602                 LogTrap(!(condition), FailedAssertion, printArgs)
603
604 #define LogAssertMacro(condition, printArgs) \
605                 LogTrapMacro(!(condition), FailedAssertion, printArgs)
606
607 #define LogAssertArg(condition, printArgs) \
608                 LogTrap(!(condition), BadArg, printArgs)
609
610 #define LogAssertState(condition, printArgs) \
611                 LogTrap(!(condition), BadState, printArgs)
612
613 extern int      assertEnable(int val);
614
615 #ifdef ASSERT_CHECKING_TEST
616 extern int      assertTest(int val);
617
618 #endif
619 #endif   /* USE_ASSERT_CHECKING */
620
621 /* ----------------------------------------------------------------
622  *                              Section 8:      Min, Max, Abs macros
623  * ----------------------------------------------------------------
624  */
625 /*
626  * Max
627  *              Return the maximum of two numbers.
628  */
629 #define Max(x, y)               ((x) > (y) ? (x) : (y))
630
631 /*
632  * Min
633  *              Return the minimum of two numbers.
634  */
635 #define Min(x, y)               ((x) < (y) ? (x) : (y))
636
637 /*
638  * Abs
639  *              Return the absolute value of the argument.
640  */
641 #define Abs(x)                  ((x) >= 0 ? (x) : -(x))
642
643 /*
644  * StrNCpy
645  *              Like standard library function strncpy(), except that result string
646  *              is guaranteed to be null-terminated --- that is, at most N-1 bytes
647  *              of the source string will be kept.
648  *              Also, the macro returns no result (too hard to do that without
649  *              evaluating the arguments multiple times, which seems worse).
650  */
651 #define StrNCpy(dst,src,len) \
652         do \
653         { \
654                 char * _dst = (dst); \
655                 Size _len = (len); \
656 \
657                 if (_len > 0) \
658                 { \
659                         strncpy(_dst, (src), _len); \
660                         _dst[_len-1] = '\0'; \
661                 } \
662         } while (0)
663
664
665 /* Get a bit mask of the bits set in non-int32 aligned addresses */
666 #define INT_ALIGN_MASK (sizeof(int32) - 1)
667
668 /*
669  * MemSet
670  *      Exactly the same as standard library function memset(), but considerably
671  *      faster for zeroing small word-aligned structures (such as parsetree nodes).
672  *      This has to be a macro because the main point is to avoid function-call
673  *      overhead.
674  *
675  *      We got the 64 number by testing this against the stock memset() on
676  *      BSD/OS 3.0. Larger values were slower.  bjm 1997/09/11
677  *
678  *  I think the crossover point could be a good deal higher for
679  *      most platforms, actually.  tgl 2000-03-19
680  */
681 #define MemSet(start, val, len) \
682         do \
683         { \
684                 int32 * _start = (int32 *) (start); \
685                 int             _val = (val); \
686                 Size    _len = (len); \
687 \
688                 if ((((long) _start) & INT_ALIGN_MASK) == 0 && \
689                         (_len & INT_ALIGN_MASK) == 0 && \
690                         _val == 0 && \
691                         _len <= MEMSET_LOOP_LIMIT) \
692                 { \
693                         int32 * _stop = (int32 *) ((char *) _start + _len); \
694                         while (_start < _stop) \
695                                 *_start++ = 0; \
696                 } \
697                 else \
698                         memset((char *) _start, _val, _len); \
699         } while (0)
700
701 #define MEMSET_LOOP_LIMIT  64
702
703
704 /* ----------------------------------------------------------------
705  *                              Section 9: externs
706  * ----------------------------------------------------------------
707  */
708
709 extern Exception FailedAssertion;
710 extern Exception BadArg;
711 extern Exception BadState;
712
713 /* in utils/error/assert.c */
714 extern int ExceptionalCondition(char *conditionName,
715                                          Exception *exceptionP, char *details,
716                                          char *fileName, int lineNumber);
717
718
719 /* ----------------
720  *              vararg_format is used by assert and the exception handling stuff
721  * ----------------
722  */
723 extern char *vararg_format(const char *fmt,...);
724
725
726
727 /* ----------------------------------------------------------------
728  *                              Section 10: berkeley-specific configuration
729  *
730  * this section contains settings which are only relevant to the UC Berkeley
731  * sites.  Other sites can ignore this
732  * ----------------------------------------------------------------
733  */
734
735 /* ----------------
736  *              storage managers
737  *
738  *              These are experimental and are not supported in the code that
739  *              we distribute to other sites.
740  * ----------------
741  */
742 #ifdef NOT_USED
743 #define STABLE_MEMORY_STORAGE
744 #endif
745
746
747
748 /* ----------------------------------------------------------------
749  *                              Section 11: system-specific hacks
750  *
751  *              This should be limited to things that absolutely have to be
752  *              included in every source file.  The changes should be factored
753  *              into a separate file so that changes to one port don't require
754  *              changes to c.h (and everyone recompiling their whole system).
755  * ----------------------------------------------------------------
756  */
757
758 #ifdef FIXADE
759 #if defined(hpux)
760 #include "port/hpux/fixade.h"   /* for unaligned access fixup */
761 #endif   /* hpux */
762 #endif
763
764 #if defined(sun) && defined(__sparc__) && !defined(__SVR4)
765 #define memmove(d, s, l)                bcopy(s, d, l)
766 #include <unistd.h>
767 #include <varargs.h>
768 #endif
769
770 /* These are for things that are one way on Unix and another on NT */
771 #define NULL_DEV                "/dev/null"
772 #define SEP_CHAR                '/'
773
774 /* defines for dynamic linking on Win32 platform */
775 #ifdef __CYGWIN32__
776 #if __GNUC__ && ! defined (__declspec)
777 #error You need egcs 1.1 or newer for compiling!
778 #endif
779 #ifdef BUILDING_DLL
780 #define DLLIMPORT __declspec (dllexport)
781 #else                                                   /* not BUILDING_DLL */
782 #define DLLIMPORT __declspec (dllimport)
783 #endif
784 #else                                                   /* not CYGWIN */
785 #define DLLIMPORT
786 #endif
787
788 /* Provide prototypes for routines not present in a particular machine's
789  * standard C library.  It'd be better to put these in config.h, but
790  * in config.h we haven't yet included anything that defines size_t...
791  */
792
793 #ifndef HAVE_SNPRINTF_DECL
794 extern int      snprintf(char *str, size_t count, const char *fmt,...);
795 #endif
796
797 #ifndef HAVE_VSNPRINTF_DECL
798 extern int      vsnprintf(char *str, size_t count, const char *fmt, va_list args);
799 #endif
800
801 #ifndef HAVE_MEMMOVE
802 #include <regex/utils.h>
803 #endif
804
805 /* ----------------
806  *              end of c.h
807  * ----------------
808  */
809 #endif   /* C_H */