32{
33 uLong flags;
34
35 flags = 0;
36 switch ((int)(sizeof(uInt))) {
37 case 2: break;
38 case 4: flags += 1; break;
39 case 8: flags += 2; break;
40 default: flags += 3;
41 }
42 switch ((int)(sizeof(uLong))) {
43 case 2: break;
44 case 4: flags += 1 << 2; break;
45 case 8: flags += 2 << 2; break;
46 default: flags += 3 << 2;
47 }
48 switch ((int)(sizeof(voidpf))) {
49 case 2: break;
50 case 4: flags += 1 << 4; break;
51 case 8: flags += 2 << 4; break;
52 default: flags += 3 << 4;
53 }
54 switch ((int)(sizeof(z_off_t))) {
55 case 2: break;
56 case 4: flags += 1 << 6; break;
57 case 8: flags += 2 << 6; break;
58 default: flags += 3 << 6;
59 }
60#ifdef ZLIB_DEBUG
61 flags += 1 << 8;
62#endif
63#if defined(ASMV) || defined(ASMINF)
64 flags += 1 << 9;
65#endif
66#ifdef ZLIB_WINAPI
67 flags += 1 << 10;
68#endif
69#ifdef BUILDFIXED
70 flags += 1 << 12;
71#endif
72#ifdef DYNAMIC_CRC_TABLE
73 flags += 1 << 13;
74#endif
75#ifdef NO_GZCOMPRESS
76 flags += 1L << 16;
77#endif
78#ifdef NO_GZIP
79 flags += 1L << 17;
80#endif
81#ifdef PKZIP_BUG_WORKAROUND
82 flags += 1L << 20;
83#endif
84#ifdef FASTEST
85 flags += 1L << 21;
86#endif
87#if defined(STDC) || defined(Z_HAVE_STDARG_H)
88# ifdef NO_vsnprintf
89 flags += 1L << 25;
90# ifdef HAS_vsprintf_void
91 flags += 1L << 26;
92# endif
93# else
94# ifdef HAS_vsnprintf_void
95 flags += 1L << 26;
96# endif
97# endif
98#else
99 flags += 1L << 24;
100# ifdef NO_snprintf
101 flags += 1L << 25;
102# ifdef HAS_sprintf_void
103 flags += 1L << 26;
104# endif
105# else
106# ifdef HAS_snprintf_void
107 flags += 1L << 26;
108# endif
109# endif
110#endif
111 return flags;
112}