OSDN Git Service

Initial revision
[pf3gnuchains/pf3gnuchains3x.git] / winsup / cygwin / include / cygwin / version.h
1 /* version.h -- Cygwin version numbers and accompanying documentation.
2
3    Copyright 1996, 1997, 1998, 1999 Cygnus Solutions.
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
44   /* The current cygwin version is 1.1.0 */
45
46 #define CYGWIN_VERSION_DLL_MAJOR 1001
47 #define CYGWIN_VERSION_DLL_MINOR 0
48
49       /* Major numbers before CYGWIN_VERSION_DLL_EPOCH are
50          incompatible. */
51
52 #define CYGWIN_VERSION_DLL_EPOCH 19
53
54       /* CYGWIN_VERSION_DLL_COMBINED gives us a single number
55          representing the combined DLL major and minor numbers. */
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_DLL_VERSION_MAJOR, CYGWIN_DLL_VERSION_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          00005
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      /* We used to use the DLL major/minor to track
74         non-backward-compatible interface changes to the API.  Now we
75         use an API major/minor number for this purpose. */
76
77      /* API_MAJOR 0.0: Initial version.  API_MINOR changes:
78         1: Export cygwin32_ calls as cygwin_ as well.
79         2: Export j1, jn, y1, yn.
80         3: Export dll_noncygwin_dllcrt0.
81         4: New socket ioctls, revamped ifconf support.
82         5: Thread support/exports.
83         6: Change in termios handling.
84         7: Export scandir and alphasort.
85         8: Export _ctype_, _sys_errlist, _sys_nerr.
86         9: Mount-related changes, new cygwin_umount export.
87            Raw device support (tape, floppies).
88        10: Fast math routine support added.
89        11: Export seekdir, telldir.
90        12: Export pthread_join, pthread_detach.
91        13: Export math funcs gamma and friends, also _j0, _j1, etc.
92        14: Export snprintf and vnsprintf.
93        15: Export glob
94        16: Export cygwin_stackdump
95      */
96
97 #define CYGWIN_VERSION_API_MAJOR 0
98 #define CYGWIN_VERSION_API_MINOR 16
99
100      /* There is also a compatibity version number associated with the
101         shared memory regions.  It is incremented when incompatible
102         changes are made to the shared memory region *or* to any named
103         shared mutexes, semaphores, etc.   The arbitrary starting
104         version was 0 (cygwin release 98r2). */
105
106 #define CYGWIN_VERSION_SHARED_DATA 3
107
108      /* An identifier used in the names used to create shared objects.
109         The full names include the CYGWIN_VERSION_SHARED_DATA version
110         as well as this identifier. */
111
112 #define CYGWIN_VERSION_DLL_IDENTIFIER   "cygwin1"
113
114      /* The Cygwin mount table interface in the Win32 registry also
115         has a version number associated with it in case that is
116         changed in a non-backwards compatible fashion.  Increment this
117         version number whenever incompatible changes in mount table
118         registry usage are made.
119
120         1: Original number version.
121         2: New mount registry layout, system-wide mount accessibility.
122      */
123
124 #define CYGWIN_VERSION_MOUNT_REGISTRY 2
125
126      /* Identifiers used in the Win32 registry. */
127
128 #define CYGWIN_INFO_CYGNUS_REGISTRY_NAME "Cygnus Solutions"
129 #define CYGWIN_INFO_CYGWIN_REGISTRY_NAME "Cygwin"
130 #define CYGWIN_INFO_PROGRAM_OPTIONS_NAME "Program Options"
131 #define CYGWIN_INFO_CYGWIN_MOUNT_REGISTRY_NAME "mounts v2"
132
133      /* In addition to the above version number strings, the build
134         process adds some strings that may be useful in
135         debugging/identifying a particular Cygwin DLL:
136
137         The mkvers.sh script at the top level produces a .cc file
138         which initializes a cygwin_version structure based on the
139         above version information and creates a string table for
140         grepping via "fgrep '%%%' cygwinwhatever.dll" if you are
141         using GNU grep.  Otherwise you may want to do a
142         "strings cygwinwhatever.dll | fgrep '%%%'" instead.
143
144         This will produce output such as:
145
146         %%% Cygwin dll_identifier: cygwin
147         %%% Cygwin api_major: 0
148         %%% Cygwin api_minor: 0
149         %%% Cygwin dll_major: 19
150         %%% Cygwin dll_minor: 6
151         %%% Cygwin shared_data: 1
152         %%% Cygwin registry: b15
153         %%% Cygwin build date: Wed Oct 14 16:26:51 EDT 1998
154         %%% Cygwin shared id: cygwinS1
155
156         This information can also be obtained through a call to
157         cygwin_internal (CW_GETVERSIONINFO).
158      */
159