]>
Commit | Line | Data |
---|---|---|
1fd5e000 CF |
1 | /* version.h -- Cygwin version numbers and accompanying documentation. |
2 | ||
e136dbc2 | 3 | Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 Red Hat, Inc. |
1fd5e000 CF |
4 | |
5 | This file is part of Cygwin. | |
6 | ||
7 | This software is a copyrighted work licensed under the terms of the | |
8 | Cygwin license. Please consult the file "CYGWIN_LICENSE" for | |
9 | details. */ | |
10 | ||
11 | /* Cygwin versioning is relatively complicated because of its status | |
12 | as a shared library. Let's start with how versioning used to be done. | |
13 | ||
14 | Historical versioning in Cygwin 16.0 to 19.5: | |
15 | ||
16 | In the olden days of Cygwin, we had a dll major and minor version | |
17 | and a registry version. The major number started at 16 because the | |
18 | "b15" GNU-Win32 release of the compiler tools was out when this | |
19 | scheme was started. We incremented the DLL name frequently (for | |
20 | every official release) and towards the end of this period every | |
21 | release used a different shared memory area to prevent DLLs from | |
22 | interfering with each other (embedding a build timestamp into the | |
23 | name of the shared memory area). This turned out to be a Bad Idea | |
24 | (tm) because people needed to mingle separate releases and have | |
25 | them work together more than we thought they would. This was | |
26 | especially problematic when tty info needed to be retained when an | |
27 | old Cygwin executable executed a newer one. | |
28 | ||
29 | In the old scheme, we incremented the major number whenever a | |
30 | change to the dll invalidated existing executables. This can | |
31 | happen for a number of reasons, including when functions are | |
32 | removed from the export list of the dll. The minor number was | |
33 | incremented when a change was made that we wanted to record, but | |
34 | that didn't invalidate existing executables. Both numbers were | |
35 | recorded in the executable and in the dll. | |
36 | ||
37 | In October 1998 (starting with Cygwin 19.6), we started a new | |
38 | means of Cygwin versioning: */ | |
39 | ||
40 | /* The DLL major and minor numbers correspond to the "version of | |
41 | the Cygwin library". This version is used to track important | |
42 | changes to the DLL and is mainly informative in nature. */ | |
43 | ||
4f42df7b | 44 | #define CYGWIN_VERSION_DLL_MAJOR 1003 |
ad80bc42 | 45 | #define CYGWIN_VERSION_DLL_MINOR 21 |
1fd5e000 CF |
46 | |
47 | /* Major numbers before CYGWIN_VERSION_DLL_EPOCH are | |
48 | incompatible. */ | |
49 | ||
50 | #define CYGWIN_VERSION_DLL_EPOCH 19 | |
51 | ||
52 | /* CYGWIN_VERSION_DLL_COMBINED gives us a single number | |
53 | representing the combined DLL major and minor numbers. */ | |
54 | ||
fcc4976d DD |
55 | /* WATCH OUT FOR OCTAL! Don't use, say, "00020" for 0.20 */ |
56 | ||
1fd5e000 CF |
57 | #define CYGWIN_VERSION_DLL_MAKE_COMBINED(maj, min) (((maj) * 1000) + min) |
58 | #define CYGWIN_VERSION_DLL_COMBINED \ | |
1bdc5f1f | 59 | CYGWIN_VERSION_DLL_MAKE_COMBINED (CYGWIN_VERSION_DLL_MAJOR, CYGWIN_VERSION_DLL_MINOR) |
1fd5e000 CF |
60 | |
61 | /* Every version of cygwin <= this uses an old, incorrect method | |
62 | to determine signal masks. */ | |
63 | ||
64 | #define CYGWIN_VERSION_DLL_BAD_SIGNAL_MASK 19005 | |
65 | ||
66 | /* API versions <= this had a termios structure whose members were | |
67 | too small to accomodate modern settings. */ | |
fcc4976d | 68 | #define CYGWIN_VERSION_DLL_OLD_TERMIOS 5 |
1fd5e000 CF |
69 | #define CYGWIN_VERSION_DLL_IS_OLD_TERMIOS \ |
70 | (CYGWIN_VERSION_DLL_MAKE_COMBINED (user_data->api_major, user_data->api_minor) <= \ | |
71 | CYGWIN_VERSION_DLL_OLD_TERMIOS) | |
72 | ||
9bc846bd | 73 | #define CYGWIN_VERSION_DLL_MALLOC_ENV 28 |
56cd25ee DD |
74 | /* Old APIs had getc/putc macros that conflict with new CR/LF |
75 | handling in the stdio buffers */ | |
76 | #define CYGWIN_VERSION_OLD_STDIO_CRLF_HANDLING \ | |
77 | (CYGWIN_VERSION_DLL_MAKE_COMBINED (user_data->api_major, user_data->api_minor) <= \ | |
fcc4976d | 78 | 20) |
56cd25ee | 79 | |
95a8465b CF |
80 | #define CYGWIN_VERSION_CHECK_FOR_S_IEXEC \ |
81 | (CYGWIN_VERSION_DLL_MAKE_COMBINED (user_data->api_major, user_data->api_minor) >= \ | |
82 | 36) | |
96a3f4ae CF |
83 | |
84 | #define CYGWIN_VERSION_CHECK_FOR_OLD_O_NONBLOCK \ | |
85 | (CYGWIN_VERSION_DLL_MAKE_COMBINED (user_data->api_major, user_data->api_minor) <= \ | |
86 | 28) | |
1fd5e000 CF |
87 | /* We used to use the DLL major/minor to track |
88 | non-backward-compatible interface changes to the API. Now we | |
89 | use an API major/minor number for this purpose. */ | |
90 | ||
91 | /* API_MAJOR 0.0: Initial version. API_MINOR changes: | |
92 | 1: Export cygwin32_ calls as cygwin_ as well. | |
93 | 2: Export j1, jn, y1, yn. | |
9c510edc CF |
94 | 3: Export dll_noncygwin_dllcrt0. |
95 | 4: New socket ioctls, revamped ifconf support. | |
96 | 5: Thread support/exports. | |
97 | 6: Change in termios handling. | |
98 | 7: Export scandir and alphasort. | |
99 | 8: Export _ctype_, _sys_errlist, _sys_nerr. | |
1fd5e000 CF |
100 | 9: Mount-related changes, new cygwin_umount export. |
101 | Raw device support (tape, floppies). | |
102 | 10: Fast math routine support added. | |
103 | 11: Export seekdir, telldir. | |
104 | 12: Export pthread_join, pthread_detach. | |
105 | 13: Export math funcs gamma and friends, also _j0, _j1, etc. | |
106 | 14: Export snprintf and vnsprintf. | |
107 | 15: Export glob | |
108 | 16: Export cygwin_stackdump | |
4b17897e | 109 | 17: Export fast math stuff |
5abc9b83 | 110 | 18: Stop exporting _strace_wm |
8a06963c | 111 | 19: Export fchown, lchown, lacl |
66aea0c5 | 112 | 20: regsub, inet_network |
56cd25ee | 113 | 21: incompatible change to stdio cr/lf and buffering |
64b30629 | 114 | 22: Export cygwin_logon_user, cygwin_set_impersonation_token. |
9c510edc CF |
115 | geteuid, getegid return effective uid/gid. |
116 | getuid, getgid return real uid/gid. | |
117 | seteuid, setegid set only effective uid/gid. | |
118 | setuid, setgid set effective and real uid/gid. | |
14a3bc2f CF |
119 | 23: Export new dll_crt0 interface and cygwin_user_data for use |
120 | with crt0 startup code. | |
914e40df | 121 | 24: Export poll and _poll. |
bd4ec496 | 122 | 25: Export getmode and _getmode. |
84c7d409 CF |
123 | 26: CW_GET_CYGDRIVE_PREFIXES addition to external.cc |
124 | 27: CW_GETPINFO_FULL addition to external.cc | |
cbe4c8e2 | 125 | 28: Accidentally bumped by cgf |
7d9688b7 | 126 | 29: Export hstrerror |
9bc846bd | 127 | 30: CW_GET_CYGDRIVE_INFO addition to external.cc |
2e68f6b4 | 128 | 31: Export inet_aton |
8a93913d | 129 | 32: Export getrlimit/setrlimit |
c65a3183 | 130 | 33: Export setlogmask |
ae6c8e4f | 131 | 34: Separated out mount table |
f97e7d75 | 132 | 35: Export drand48, erand48, jrand48, lcong48, lrand48, |
9c510edc | 133 | mrand48, nrand48, seed48, and srand48. |
95a8465b | 134 | 36: Added _cygwin_S_IEXEC, et al |
30f326bf | 135 | 37: [f]pathconv support _PC_POSIX_PERMISSIONS and _PC_POSIX_SECURITY |
c02e9189 | 136 | 38: vscanf, vscanf_r, and random pthread functions |
86699e15 | 137 | 39: asctime_r, ctime_r, gmtime_r, localtime_r |
463513f0 | 138 | 40: fchdir |
351a8548 | 139 | 41: __signgam |
8e4e3874 | 140 | 42: sys_errlist, sys_nerr |
3ca6bcc4 | 141 | 43: sigsetjmp, siglongjmp fixed |
a71aee46 | 142 | 44: Export dirfd |
c12a96d1 | 143 | 45: perprocess change, gamma_r, gammaf_r, lgamma_r, lgammaf_r |
dbc82a87 | 144 | 46: Remove cygwin_getshared |
b20e2ee6 | 145 | 47: Report EOTWarningZoneSize in struct mtget. |
4f235c95 | 146 | 48: Export "posix" regex functions |
971ec8d3 | 147 | 49: Export setutent, endutent, utmpname, getutent, getutid, getutline. |
104c3be6 | 148 | 50: Export fnmatch. |
df3af773 | 149 | 51: Export recvmsg, sendmsg. |
dbe67a81 | 150 | 52: Export strptime |
feb7f1a9 | 151 | 53: Export strlcat, strlcpy. |
b7e51146 | 152 | 54: Export __fpclassifyd, __fpclassifyf, __signbitd, __signbitf. |
bf47141f | 153 | 55: Export fcloseall, fcloseall_r. |
667f875d | 154 | 56: Make ntsec on by default. |
5519d543 | 155 | 57: Export setgroups. |
c7e2187a CF |
156 | 58: Export memalign, valloc, malloc_trim, malloc_usable_size, mallopt, |
157 | malloc_stats | |
8dca9e23 | 158 | 59: getsid |
281d8a32 | 159 | 60: MSG_NOSIGNAL |
75d01d9e CV |
160 | 61: Export getc_unlocked, getchar_unlocked, putc_unlocked, |
161 | putchar_unlocked | |
8efb9fd7 CF |
162 | 62: Erroneously bumped |
163 | 63: Export pututline | |
0be11474 | 164 | 64: Export fseeko, ftello |
8efb9fd7 | 165 | 65: Export siginterrupt |
05c728c4 | 166 | 66: Export nl_langinfo |
cdaf8896 | 167 | 67: Export pthread_getsequence_np |
838ad582 | 168 | 68: Export netdb stuff |
11b087d5 | 169 | 69: Export strtof |
70d61f30 | 170 | 70: Export asprintf, _asprintf_r, vasprintf, _vasprintf_r |
afa378e7 | 171 | 71: Export strerror_r |
89f7e8d1 | 172 | 72: Export nanosleep |
7d33eefa | 173 | 73: Export setreuid32, setreuid, setregid32, setregid |
1fd5e000 CF |
174 | */ |
175 | ||
77f4a250 CF |
176 | /* Note that we forgot to bump the api for ualarm, strtoll, strtoull */ |
177 | ||
1fd5e000 | 178 | #define CYGWIN_VERSION_API_MAJOR 0 |
7d33eefa | 179 | #define CYGWIN_VERSION_API_MINOR 73 |
1fd5e000 CF |
180 | |
181 | /* There is also a compatibity version number associated with the | |
182 | shared memory regions. It is incremented when incompatible | |
183 | changes are made to the shared memory region *or* to any named | |
184 | shared mutexes, semaphores, etc. The arbitrary starting | |
185 | version was 0 (cygwin release 98r2). */ | |
186 | ||
187 | #define CYGWIN_VERSION_SHARED_DATA 3 | |
188 | ||
189 | /* An identifier used in the names used to create shared objects. | |
190 | The full names include the CYGWIN_VERSION_SHARED_DATA version | |
191 | as well as this identifier. */ | |
192 | ||
193 | #define CYGWIN_VERSION_DLL_IDENTIFIER "cygwin1" | |
194 | ||
195 | /* The Cygwin mount table interface in the Win32 registry also | |
196 | has a version number associated with it in case that is | |
197 | changed in a non-backwards compatible fashion. Increment this | |
198 | version number whenever incompatible changes in mount table | |
199 | registry usage are made. | |
200 | ||
201 | 1: Original number version. | |
202 | 2: New mount registry layout, system-wide mount accessibility. | |
203 | */ | |
204 | ||
205 | #define CYGWIN_VERSION_MOUNT_REGISTRY 2 | |
206 | ||
207 | /* Identifiers used in the Win32 registry. */ | |
208 | ||
209 | #define CYGWIN_INFO_CYGNUS_REGISTRY_NAME "Cygnus Solutions" | |
210 | #define CYGWIN_INFO_CYGWIN_REGISTRY_NAME "Cygwin" | |
211 | #define CYGWIN_INFO_PROGRAM_OPTIONS_NAME "Program Options" | |
212 | #define CYGWIN_INFO_CYGWIN_MOUNT_REGISTRY_NAME "mounts v2" | |
a98b1584 CF |
213 | #define CYGWIN_INFO_CYGDRIVE_FLAGS "cygdrive flags" |
214 | #define CYGWIN_INFO_CYGDRIVE_PREFIX "cygdrive prefix" | |
215 | #define CYGWIN_INFO_CYGDRIVE_DEFAULT_PREFIX "/cygdrive" | |
1fd5e000 CF |
216 | |
217 | /* In addition to the above version number strings, the build | |
218 | process adds some strings that may be useful in | |
219 | debugging/identifying a particular Cygwin DLL: | |
220 | ||
221 | The mkvers.sh script at the top level produces a .cc file | |
222 | which initializes a cygwin_version structure based on the | |
223 | above version information and creates a string table for | |
224 | grepping via "fgrep '%%%' cygwinwhatever.dll" if you are | |
225 | using GNU grep. Otherwise you may want to do a | |
226 | "strings cygwinwhatever.dll | fgrep '%%%'" instead. | |
227 | ||
228 | This will produce output such as: | |
229 | ||
230 | %%% Cygwin dll_identifier: cygwin | |
231 | %%% Cygwin api_major: 0 | |
232 | %%% Cygwin api_minor: 0 | |
233 | %%% Cygwin dll_major: 19 | |
234 | %%% Cygwin dll_minor: 6 | |
235 | %%% Cygwin shared_data: 1 | |
236 | %%% Cygwin registry: b15 | |
237 | %%% Cygwin build date: Wed Oct 14 16:26:51 EDT 1998 | |
238 | %%% Cygwin shared id: cygwinS1 | |
239 | ||
240 | This information can also be obtained through a call to | |
241 | cygwin_internal (CW_GETVERSIONINFO). | |
242 | */ | |
243 | ||
082512ae | 244 | #define CYGWIN_VERSION_MAGIC(a, b) ((unsigned) ((((unsigned short) a) << 16) | (unsigned short) b)) |
77f4a250 | 245 | #define CYGWIN_VERSION_MAGIC_VERSION(a) ((unsigned) ((unsigned)a & 0xffff)) |