1 /* version.h -- Cygwin version numbers and accompanying documentation. 2 3 Copyright 1996, 1997, 1998, 1999, 2000, 2001 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 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 8 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 /* WATCH OUT FOR OCTAL! Don't use, say, "00020" for 0.20 */ 58 59 #define CYGWIN_VERSION_DLL_MAKE_COMBINED(maj, min) (((maj) * 1000) + min) 60 #define CYGWIN_VERSION_DLL_COMBINED \ 61 CYGWIN_VERSION_DLL_MAKE_COMBINED (CYGWIN_VERSION_DLL_MAJOR, CYGWIN_VERSION_DLL_MINOR) 62 63 /* Every version of cygwin <= this uses an old, incorrect method 64 to determine signal masks. */ 65 66 #define CYGWIN_VERSION_DLL_BAD_SIGNAL_MASK 19005 67 68 /* API versions <= this had a termios structure whose members were 69 too small to accomodate modern settings. */ 70 #define CYGWIN_VERSION_DLL_OLD_TERMIOS 5 71 #define CYGWIN_VERSION_DLL_IS_OLD_TERMIOS \ 72 (CYGWIN_VERSION_DLL_MAKE_COMBINED (user_data->api_major, user_data->api_minor) <= \ 73 CYGWIN_VERSION_DLL_OLD_TERMIOS) 74 75 #define CYGWIN_VERSION_DLL_MALLOC_ENV 28 76 /* Old APIs had getc/putc macros that conflict with new CR/LF 77 handling in the stdio buffers */ 78 #define CYGWIN_VERSION_OLD_STDIO_CRLF_HANDLING \ 79 (CYGWIN_VERSION_DLL_MAKE_COMBINED (user_data->api_major, user_data->api_minor) <= \ 80 20) 81 82 83 /* We used to use the DLL major/minor to track 84 non-backward-compatible interface changes to the API. Now we 85 use an API major/minor number for this purpose. */ 86 87 /* API_MAJOR 0.0: Initial version. API_MINOR changes: 88 1: Export cygwin32_ calls as cygwin_ as well. 89 2: Export j1, jn, y1, yn. 90 3: Export dll_noncygwin_dllcrt0. 91 4: New socket ioctls, revamped ifconf support. 92 5: Thread support/exports. 93 6: Change in termios handling. 94 7: Export scandir and alphasort. 95 8: Export _ctype_, _sys_errlist, _sys_nerr. 96 9: Mount-related changes, new cygwin_umount export. 97 Raw device support (tape, floppies). 98 10: Fast math routine support added. 99 11: Export seekdir, telldir. 100 12: Export pthread_join, pthread_detach. 101 13: Export math funcs gamma and friends, also _j0, _j1, etc. 102 14: Export snprintf and vnsprintf. 103 15: Export glob 104 16: Export cygwin_stackdump 105 17: Export fast math stuff 106 18: Stop exporting _strace_wm 107 19: Export fchown, lchown, lacl 108 20: regsub, inet_network 109 21: incompatible change to stdio cr/lf and buffering 110 22: Export cygwin_logon_user, cygwin_set_impersonation_token. 111 geteuid, getegid return effective uid/gid. 112 getuid, getgid return real uid/gid. 113 seteuid, setegid set only effective uid/gid. 114 setuid, setgid set effective and real uid/gid. 115 23: Export new dll_crt0 interface and cygwin_user_data for use 116 with crt0 startup code. 117 24: Export poll and _poll. 118 25: Export getmode and _getmode. 119 26: CW_GET_CYGDRIVE_PREFIXES addition to external.cc 120 27: CW_GETPINFO_FULL addition to external.cc 121 28: Accidentally bumped by cgf 122 29: Export hstrerror 123 30: CW_GET_CYGDRIVE_INFO addition to external.cc 124 31: Export inet_aton 125 32: Export getrlimit/setrlimit 126 33: Export setlogmask 127 34: Separated out mount table 128 */ 129 130 #define CYGWIN_VERSION_API_MAJOR 0 131 #define CYGWIN_VERSION_API_MINOR 34 132 133 /* There is also a compatibity version number associated with the 134 shared memory regions. It is incremented when incompatible 135 changes are made to the shared memory region *or* to any named 136 shared mutexes, semaphores, etc. The arbitrary starting 137 version was 0 (cygwin release 98r2). */ 138 139 #define CYGWIN_VERSION_SHARED_DATA 3 140 141 /* An identifier used in the names used to create shared objects. 142 The full names include the CYGWIN_VERSION_SHARED_DATA version 143 as well as this identifier. */ 144 145 #define CYGWIN_VERSION_DLL_IDENTIFIER "cygwin1" 146 147 /* The Cygwin mount table interface in the Win32 registry also 148 has a version number associated with it in case that is 149 changed in a non-backwards compatible fashion. Increment this 150 version number whenever incompatible changes in mount table 151 registry usage are made. 152 153 1: Original number version. 154 2: New mount registry layout, system-wide mount accessibility. 155 */ 156 157 #define CYGWIN_VERSION_MOUNT_REGISTRY 2 158 159 /* Identifiers used in the Win32 registry. */ 160 161 #define CYGWIN_INFO_CYGNUS_REGISTRY_NAME "Cygnus Solutions" 162 #define CYGWIN_INFO_CYGWIN_REGISTRY_NAME "Cygwin" 163 #define CYGWIN_INFO_PROGRAM_OPTIONS_NAME "Program Options" 164 #define CYGWIN_INFO_CYGWIN_MOUNT_REGISTRY_NAME "mounts v2" 165 #define CYGWIN_INFO_CYGDRIVE_FLAGS "cygdrive flags" 166 #define CYGWIN_INFO_CYGDRIVE_PREFIX "cygdrive prefix" 167 #define CYGWIN_INFO_CYGDRIVE_DEFAULT_PREFIX "/cygdrive" 168 169 /* In addition to the above version number strings, the build 170 process adds some strings that may be useful in 171 debugging/identifying a particular Cygwin DLL: 172 173 The mkvers.sh script at the top level produces a .cc file 174 which initializes a cygwin_version structure based on the 175 above version information and creates a string table for 176 grepping via "fgrep '%%%' cygwinwhatever.dll" if you are 177 using GNU grep. Otherwise you may want to do a 178 "strings cygwinwhatever.dll | fgrep '%%%'" instead. 179 180 This will produce output such as: 181 182 %%% Cygwin dll_identifier: cygwin 183 %%% Cygwin api_major: 0 184 %%% Cygwin api_minor: 0 185 %%% Cygwin dll_major: 19 186 %%% Cygwin dll_minor: 6 187 %%% Cygwin shared_data: 1 188 %%% Cygwin registry: b15 189 %%% Cygwin build date: Wed Oct 14 16:26:51 EDT 1998 190 %%% Cygwin shared id: cygwinS1 191 192 This information can also be obtained through a call to 193 cygwin_internal (CW_GETVERSIONINFO). 194 */ |