OSDN Git Service

Revert erroneous checkin.
[pf3gnuchains/sourceware.git] / winsup / cygwin / include / cygwin / version.h
1 /* version.h -- Cygwin version numbers and accompanying documentation.
2
3    Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 Red Hat, Inc.
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 method
38    of Cygwin versioning: */
39
40       /* The DLL major and minor numbers correspond to the "version of
41          the Cygwin shared library".  This version is used to track important
42          changes to the DLL and is mainly informative in nature. */
43
44 #define CYGWIN_VERSION_DLL_MAJOR 1005
45 #define CYGWIN_VERSION_DLL_MINOR 19
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
55       /* WATCH OUT FOR OCTAL!  Don't use, say, "00020" for 0.20 */
56
57 #define CYGWIN_VERSION_DLL_MAKE_COMBINED(maj, min) (((maj) * 1000) + min)
58 #define CYGWIN_VERSION_DLL_COMBINED \
59   CYGWIN_VERSION_DLL_MAKE_COMBINED (CYGWIN_VERSION_DLL_MAJOR, CYGWIN_VERSION_DLL_MINOR)
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. */
68 #define CYGWIN_VERSION_DLL_OLD_TERMIOS          5
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
73 #define CYGWIN_VERSION_DLL_MALLOC_ENV           28
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) <= \
78   20)
79
80 #define CYGWIN_VERSION_CHECK_FOR_S_IEXEC \
81   (CYGWIN_VERSION_DLL_MAKE_COMBINED (user_data->api_major, user_data->api_minor) >= \
82   36)
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)
87
88 #define CYGWIN_VERSION_CHECK_FOR_USING_BIG_TYPES \
89   (CYGWIN_VERSION_DLL_MAKE_COMBINED (user_data->api_major, user_data->api_minor) >= \
90   79)
91      /* We used to use the DLL major/minor to track
92         non-backward-compatible interface changes to the API.  Now we
93         use an API major/minor number for this purpose. */
94
95      /* API_MAJOR 0.0: Initial version.  API_MINOR changes:
96         1: Export cygwin32_ calls as cygwin_ as well.
97         2: Export j1, jn, y1, yn.
98         3: Export dll_noncygwin_dllcrt0.
99         4: New socket ioctls, revamped ifconf support.
100         5: Thread support/exports.
101         6: Change in termios handling.
102         7: Export scandir and alphasort.
103         8: Export _ctype_, _sys_errlist, _sys_nerr.
104         9: Mount-related changes, new cygwin_umount export.
105            Raw device support (tape, floppies).
106        10: Fast math routine support added.
107        11: Export seekdir, telldir.
108        12: Export pthread_join, pthread_detach.
109        13: Export math funcs gamma and friends, also _j0, _j1, etc.
110        14: Export snprintf and vnsprintf.
111        15: Export glob
112        16: Export cygwin_stackdump
113        17: Export fast math stuff
114        18: Stop exporting _strace_wm
115        19: Export fchown, lchown, lacl
116        20: regsub, inet_network
117        21: incompatible change to stdio cr/lf and buffering
118        22: Export cygwin_logon_user, cygwin_set_impersonation_token.
119            geteuid, getegid return effective uid/gid.
120            getuid, getgid return real uid/gid.
121            seteuid, setegid set only effective uid/gid.
122            setuid, setgid set effective and real uid/gid.
123        23: Export new dll_crt0 interface and cygwin_user_data for use
124            with crt0 startup code.
125        24: Export poll and _poll.
126        25: Export getmode and _getmode.
127        26: CW_GET_CYGDRIVE_PREFIXES addition to external.cc
128        27: CW_GETPINFO_FULL addition to external.cc
129        28: Accidentally bumped by cgf
130        29: Export hstrerror
131        30: CW_GET_CYGDRIVE_INFO addition to external.cc
132        31: Export inet_aton
133        32: Export getrlimit/setrlimit
134        33: Export setlogmask
135        34: Separated out mount table
136        35: Export drand48, erand48, jrand48, lcong48, lrand48,
137            mrand48, nrand48, seed48, and srand48.
138        36: Added _cygwin_S_IEXEC, et al
139        37: [f]pathconv support _PC_POSIX_PERMISSIONS and _PC_POSIX_SECURITY
140        38: vscanf, vscanf_r, and random pthread functions
141        39: asctime_r, ctime_r, gmtime_r, localtime_r
142        40: fchdir
143        41: __signgam
144        42: sys_errlist, sys_nerr
145        43: sigsetjmp, siglongjmp fixed
146        44: Export dirfd
147        45: perprocess change, gamma_r, gammaf_r, lgamma_r, lgammaf_r
148        46: Remove cygwin_getshared
149        47: Report EOTWarningZoneSize in struct mtget.
150        48: Export "posix" regex functions
151        49: Export setutent, endutent, utmpname, getutent, getutid, getutline.
152        50: Export fnmatch.
153        51: Export recvmsg, sendmsg.
154        52: Export strptime
155        53: Export strlcat, strlcpy.
156        54: Export __fpclassifyd, __fpclassifyf, __signbitd, __signbitf.
157        55: Export fcloseall, fcloseall_r.
158        56: Make ntsec on by default.
159        57: Export setgroups.
160        58: Export memalign, valloc, malloc_trim, malloc_usable_size, mallopt,
161            malloc_stats
162        59: getsid
163        60: MSG_NOSIGNAL
164        61: Export getc_unlocked, getchar_unlocked, putc_unlocked,
165            putchar_unlocked
166        62: Erroneously bumped
167        63: Export pututline
168        64: Export fseeko, ftello
169        65: Export siginterrupt
170        66: Export nl_langinfo
171        67: Export pthread_getsequence_np
172        68: Export netdb stuff
173        69: Export strtof
174        70: Export asprintf, _asprintf_r, vasprintf, _vasprintf_r
175        71: Export strerror_r
176        72: Export nanosleep
177        73: Export setreuid32, setreuid, setregid32, setregid
178        74: Export _strtold a64l hcreate hcreate_r hdestroy hdestroy_r hsearch
179                   hsearch_r isblank iswalnum iswalpha iswblank iswcntrl iswctype
180                   iswdigit iswgraph iswlower iswprint iswpunct iswspace iswupper
181                   iswxdigit l64a mbrlen mbrtowc mbsinit mbsrtowcs mempcpy
182                   on_exit setbuffer setlinebuf strndup strnlen tdelete tdestroy
183                   tfind towctrans towlower towupper tsearch twalk wcrtomb wcscat
184                   wcschr wcscpy wcscspn wcslcat wcslcpy wcsncat wcsncmp wcsncpy
185                   wcspbrk wcsrchr wcsrtombs wcsspn wcsstr wctob wctob wctrans
186                   wctype wmemchr wmemcmp wmemcpy wmemmove wmemset
187        75: Export exp2 exp2f fdim fdimf fma fmaf fmax fmaxf fmin fminf lrint
188                   lrintf lround lroundf nearbyint nearbyintf remquo remquof
189                   round roundf scalbln scalblnf sincos sincosf tgamma tgammaf
190                   truncf
191        76: mallinfo
192        77: thread-safe exit/at_exit
193        78: Use stat and fstat rather than _stat, and _fstat.
194            Export btowc and trunc.
195        79: Export acl32 aclcheck32 aclfrommode32 aclfrompbits32 aclfromtext32
196                   aclsort32 acltomode32 acltopbits32 acltotext32 facl32
197                   fgetpos64 fopen64 freopen64 fseeko64 fsetpos64 ftello64
198                   _open64 _lseek64 _fstat64 _stat64 mknod32
199        80: Export pthread_rwlock stuff
200        81: CW_CHECK_NTSEC addition to external.cc
201        82: Export wcscoll wcswidth wcwidth
202        83: Export gethostid
203        84: Pty open allocates invisible console.  64 bit interface
204        85: Export new 32/64 functions from API 0.79 only with leading
205            underscore.  No problems with backward compatibility since no
206            official release has been made so far.  This change removes
207            exported symbols like fopen64, which might confuse configure.
208        86: Export ftok
209        87: Export vsyslog
210        88: Export _getreent
211        89: Export __mempcpy
212        90: Export _fopen64
213        91: Export argz_add argz_add_sep argz_append argz_count argz_create
214            argz_create_sep argz_delete argz_extract argz_insert
215            argz_next argz_replace argz_stringify envz_add envz_entry
216            envz_get envz_merge envz_remove envz_strip
217        92: Export getusershell, setusershell, endusershell
218        93: Export daemon, forkpty, openpty, iruserok, ruserok, login_tty,
219            openpty, forkpty, revoke, logwtmp, updwtmp
220        94: Export getopt, getopt_long, optarg, opterr, optind, optopt,
221            optreset, __check_rhosts_file, __rcmd_errstr.
222        95: Export shmat, shmctl, shmdt, shmget.
223        96: CW_GET_ERRNO_FROM_WINERROR addition to external.cc
224        97: Export sem_open, sem_close, sem_timedwait, sem_getvalue.
225        98: Export _tmpfile64.
226        99: CW_GET_POSIX_SECURITY_ATTRIBUTE addition to external.cc.
227       100: CW_GET_SHMLBA addition to external.cc.
228       101: Export err, errx, verr, verrx, warn, warnx, vwarn, vwarnx.
229       102: CW_GET_UID_FROM_SID and CW_GET_GID_FROM_SID addition to external.cc.
230       103: Export getprogname, setprogname.
231       104: Export msgctl, msgget, msgrcv, msgsnd, semctl, semget, semop.
232       105: Export sigwait.
233       106: Export flock.
234       107: Export fcntl64.
235       108: Remove unused (hopefully) reent_data export.
236       109: Oh well.  Someone uses reent_data.
237       110: Export clock_gettime, sigwaitinfo, timer_create, timer_delete,
238            timer_settime
239       111: Export sigqueue, sighold.
240       112: Redefine some mtget fields.
241       113: Again redefine some mtget fields.  Use mt_fileno and mt_blkno as
242            on Linux.
243       114: Export rand_r, ttyname_r.
244       115: Export flockfile, ftrylockfile, funlockfile, getgrgid_r, getgrnam_r,
245            getlogin_r.
246       116: Export atoll.
247       117: Export utmpx functions, Return utmp * from pututent.
248       118: Export getpriority, setpriority.
249       119: Export fdatasync.
250       120: Export basename, dirname.
251       122: Export statvfs, fstatvfs.
252       123: Export utmpxname.
253       124: Add MAP_AUTOGROW flag to mmap.
254       125: LD_PRELOAD/CW_HOOK available.
255       126: Export lsearch, lfind, timer_gettime.
256       127: Export sigrelese.
257       128: Export pselect.
258       129: Export mkdtemp.
259       130: Export strtoimax, strtoumax, llabs, imaxabs, lldiv, imaxdiv.
260       131: Export inet_ntop, inet_pton.
261       132: Add GLOB_LIMIT flag to glob.
262       133: Export __getline, __getdelim.
263       134: Export getline, getdelim.
264       135: Export pread, pwrite
265       136: Add TIOCMBIS/TIOCMBIC ioctl codes.
266       137: fts_children, fts_close, fts_get_clientptr, fts_get_stream,
267            fts_open, fts_read, fts_set, fts_set_clientptr, ftw, nftw.
268       138: Export readdir_r.
269      */
270
271      /* Note that we forgot to bump the api for ualarm, strtoll, strtoull */
272
273 #define CYGWIN_VERSION_API_MAJOR 0
274 #define CYGWIN_VERSION_API_MINOR 138
275
276      /* There is also a compatibity version number associated with the
277         shared memory regions.  It is incremented when incompatible
278         changes are made to the shared memory region *or* to any named
279         shared mutexes, semaphores, etc.   The arbitrary starting
280         version was 0 (cygwin release 98r2).
281         Bump to 4 since this hasn't been rigorously updated in a
282         while.  */
283
284 #define CYGWIN_VERSION_SHARED_DATA 4
285
286      /* An identifier used in the names used to create shared objects.
287         The full names include the CYGWIN_VERSION_SHARED_DATA version
288         as well as this identifier. */
289
290 #define CYGWIN_VERSION_DLL_IDENTIFIER   "cygwin1"
291
292      /* The Cygwin mount table interface in the Win32 registry also
293         has a version number associated with it in case that is
294         changed in a non-backwards compatible fashion.  Increment this
295         version number whenever incompatible changes in mount table
296         registry usage are made.
297
298         1: Original number version.
299         2: New mount registry layout, system-wide mount accessibility.
300      */
301
302 #define CYGWIN_VERSION_MOUNT_REGISTRY 2
303
304      /* Identifiers used in the Win32 registry. */
305
306 #define CYGWIN_INFO_CYGNUS_REGISTRY_NAME "Cygnus Solutions"
307 #define CYGWIN_INFO_CYGWIN_REGISTRY_NAME "Cygwin"
308 #define CYGWIN_INFO_PROGRAM_OPTIONS_NAME "Program Options"
309 #define CYGWIN_INFO_CYGWIN_MOUNT_REGISTRY_NAME "mounts v2"
310 #define CYGWIN_INFO_CYGDRIVE_FLAGS "cygdrive flags"
311 #define CYGWIN_INFO_CYGDRIVE_PREFIX "cygdrive prefix"
312 #define CYGWIN_INFO_CYGDRIVE_DEFAULT_PREFIX "/cygdrive"
313
314      /* In addition to the above version number strings, the build
315         process adds some strings that may be useful in
316         debugging/identifying a particular Cygwin DLL:
317
318         The mkvers.sh script at the top level produces a .cc file
319         which initializes a cygwin_version structure based on the
320         above version information and creates a string table for
321         grepping via "fgrep '%%%' cygwinwhatever.dll" if you are
322         using GNU grep.  Otherwise you may want to do a
323         "strings cygwinwhatever.dll | fgrep '%%%'" instead.
324
325         This will produce output such as:
326
327         %%% Cygwin dll_identifier: cygwin
328         %%% Cygwin api_major: 0
329         %%% Cygwin api_minor: 0
330         %%% Cygwin dll_major: 19
331         %%% Cygwin dll_minor: 6
332         %%% Cygwin shared_data: 1
333         %%% Cygwin registry: b15
334         %%% Cygwin build date: Wed Oct 14 16:26:51 EDT 1998
335         %%% Cygwin shared id: cygwinS1
336
337         This information can also be obtained through a call to
338         cygwin_internal (CW_GETVERSIONINFO).
339      */
340
341 #define CYGWIN_VERSION_MAGIC(a, b) ((unsigned) ((((unsigned short) a) << 16) | (unsigned short) b))
342 #define CYGWIN_VERSION_MAGIC_VERSION(a) ((unsigned) ((unsigned)a & 0xffff))