Go to most recent revision | Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
548 | serge | 1 | /**************************************************************************** |
2 | * |
||
3 | * Open Watcom Project |
||
4 | * |
||
5 | * Portions Copyright (c) 1983-2002 Sybase, Inc. All Rights Reserved. |
||
6 | * |
||
7 | * ======================================================================== |
||
8 | * |
||
9 | * This file contains Original Code and/or Modifications of Original |
||
10 | * Code as defined in and that are subject to the Sybase Open Watcom |
||
11 | * Public License version 1.0 (the 'License'). You may not use this file |
||
12 | * except in compliance with the License. BY USING THIS FILE YOU AGREE TO |
||
13 | * ALL TERMS AND CONDITIONS OF THE LICENSE. A copy of the License is |
||
14 | * provided with the Original Code and Modifications, and is also |
||
15 | * available at www.sybase.com/developer/opensource. |
||
16 | * |
||
17 | * The Original Code and all software distributed under the License are |
||
18 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER |
||
19 | * EXPRESS OR IMPLIED, AND SYBASE AND ALL CONTRIBUTORS HEREBY DISCLAIM |
||
20 | * ALL SUCH WARRANTIES, INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF |
||
21 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR |
||
22 | * NON-INFRINGEMENT. Please see the License for the specific language |
||
23 | * governing rights and limitations under the License. |
||
24 | * |
||
25 | * ======================================================================== |
||
26 | * |
||
27 | * Description: Configure 'j', 'z', and 't' modifiers for __scnf and __prtf. |
||
28 | * |
||
29 | ****************************************************************************/ |
||
30 | |||
31 | |||
32 | #ifndef PTRSCNF_H_INCLUDED |
||
33 | #define PTRSCNF_H_INCLUDED |
||
34 | |||
35 | #include |
||
36 | #include |
||
37 | |||
38 | /* Currently size_t is always 'unsigned int', but won't be on LP64 systems */ |
||
39 | |||
40 | #if SIZE_MAX == UINT_MAX |
||
41 | #define ZSPEC_IS_INT |
||
42 | #elif SIZE_MAX == ULONG_MAX |
||
43 | #define ZSPEC_IS_LONG |
||
44 | #else |
||
45 | #error Could not configure zspec |
||
46 | #endif |
||
47 | |||
48 | /* Currently intmax_t is always 'long long int' but might be something |
||
49 | * else, in theory at least |
||
50 | */ |
||
51 | #if INTMAX_MAX == LLONG_MAX |
||
52 | #define JSPEC_IS_LLONG |
||
53 | #define JSPEC_CASE_LLONG case 'j': |
||
54 | #else |
||
55 | #error Could not configure jspec |
||
56 | #endif |
||
57 | |||
58 | /* Currently ptrdiff_t can be either 'long int' or 'int' */ |
||
59 | #if PTRDIFF_MAX == INT_MAX |
||
60 | #define TSPEC_IS_INT |
||
61 | #elif PTRDIFF_MAX == LONG_MAX |
||
62 | #define TSPEC_IS_LONG |
||
63 | #else |
||
64 | #error Could not configure tspec |
||
65 | #endif |
||
66 | |||
67 | #ifdef ZSPEC_IS_INT |
||
68 | #define ZSPEC_CASE_INT case 'z': |
||
69 | #else |
||
70 | #define ZSPEC_CASE_INT |
||
71 | #endif |
||
72 | |||
73 | #ifdef ZSPEC_IS_LONG |
||
74 | #define ZSPEC_CASE_LONG case 'z': |
||
75 | #else |
||
76 | #define ZSPEC_CASE_LONG |
||
77 | #endif |
||
78 | |||
79 | #ifdef TSPEC_IS_INT |
||
80 | #define TSPEC_CASE_INT case 't': |
||
81 | #else |
||
82 | #define TSPEC_CASE_INT |
||
83 | #endif |
||
84 | |||
85 | #ifdef TSPEC_IS_LONG |
||
86 | #define TSPEC_CASE_LONG case 't': |
||
87 | #else |
||
88 | #define TSPEC_CASE_LONG |
||
89 | #endif |
||
90 | |||
91 | #endif |