* include/cygwin/version.h (CYGWIN_VERSION_CHECK_FOR_USING_BIG_TYPES):
Define. * glob.c (g_lstat): Use CYGWIN_VERSION_CHECK_FOR_USING_BIG_TYPES instead of numerical constants. (g_stat): Ditto.
This commit is contained in:
		| @@ -1,3 +1,11 @@ | |||||||
|  | 2003-03-19  Corinna Vinschen  <corinna@vinschen.de> | ||||||
|  |  | ||||||
|  | 	* include/cygwin/version.h (CYGWIN_VERSION_CHECK_FOR_USING_BIG_TYPES): | ||||||
|  | 	Define. | ||||||
|  | 	* glob.c (g_lstat): Use CYGWIN_VERSION_CHECK_FOR_USING_BIG_TYPES | ||||||
|  | 	instead of numerical constants. | ||||||
|  | 	(g_stat): Ditto. | ||||||
|  |  | ||||||
| 2003-03-18  Thomas Pfaff  <tpfaff@gmx.net> | 2003-03-18  Thomas Pfaff  <tpfaff@gmx.net> | ||||||
|  |  | ||||||
| 	* pthread.cc (pthread_attr_init): Remove | 	* pthread.cc (pthread_attr_init): Remove | ||||||
|   | |||||||
| @@ -81,6 +81,7 @@ | |||||||
| #include <windows.h> | #include <windows.h> | ||||||
|  |  | ||||||
| #include "perprocess.h" | #include "perprocess.h" | ||||||
|  | #include "cygwin/version.h" | ||||||
|  |  | ||||||
| #ifdef __weak_alias | #ifdef __weak_alias | ||||||
| #ifdef __LIBC12_SOURCE__ | #ifdef __LIBC12_SOURCE__ | ||||||
| @@ -840,7 +841,7 @@ g_lstat(fn, sb, pglob) | |||||||
| 		struct __stat32 lsb; | 		struct __stat32 lsb; | ||||||
| 		int ret; | 		int ret; | ||||||
|  |  | ||||||
| 		if (user_data->api_major > 0 || user_data->api_minor > 78) | 		if (CYGWIN_VERSION_CHECK_FOR_USING_BIG_TYPES) | ||||||
| 		  ret = (*pglob->gl_lstat)(buf, &sb); | 		  ret = (*pglob->gl_lstat)(buf, &sb); | ||||||
| 		else if (!(ret = (*pglob->gl_lstat)(buf, &lsb))) | 		else if (!(ret = (*pglob->gl_lstat)(buf, &lsb))) | ||||||
| 			stat32_to_STAT (&lsb, sb); | 			stat32_to_STAT (&lsb, sb); | ||||||
| @@ -866,7 +867,7 @@ g_stat(fn, sb, pglob) | |||||||
| 		struct __stat32 lsb; | 		struct __stat32 lsb; | ||||||
| 		int ret; | 		int ret; | ||||||
|  |  | ||||||
| 		if (user_data->api_major > 0 || user_data->api_minor > 78) | 		if (CYGWIN_VERSION_CHECK_FOR_USING_BIG_TYPES) | ||||||
| 		  ret = (*pglob->gl_stat)(buf, &sb); | 		  ret = (*pglob->gl_stat)(buf, &sb); | ||||||
| 		if (!(ret = (*pglob->gl_stat)(buf, &lsb))) | 		if (!(ret = (*pglob->gl_stat)(buf, &lsb))) | ||||||
| 			stat32_to_STAT (&lsb, sb); | 			stat32_to_STAT (&lsb, sb); | ||||||
|   | |||||||
| @@ -84,6 +84,10 @@ details. */ | |||||||
| #define CYGWIN_VERSION_CHECK_FOR_OLD_O_NONBLOCK \ | #define CYGWIN_VERSION_CHECK_FOR_OLD_O_NONBLOCK \ | ||||||
|   (CYGWIN_VERSION_DLL_MAKE_COMBINED (user_data->api_major, user_data->api_minor) <= \ |   (CYGWIN_VERSION_DLL_MAKE_COMBINED (user_data->api_major, user_data->api_minor) <= \ | ||||||
|   28) |   28) | ||||||
|  |  | ||||||
|  | #define CYGWIN_VERSION_CHECK_FOR_USING_BIG_TYPES \ | ||||||
|  |   (CYGWIN_VERSION_DLL_MAKE_COMBINED (user_data->api_major, user_data->api_minor) >= \ | ||||||
|  |   79) | ||||||
|      /* We used to use the DLL major/minor to track |      /* We used to use the DLL major/minor to track | ||||||
| 	non-backward-compatible interface changes to the API.  Now we | 	non-backward-compatible interface changes to the API.  Now we | ||||||
| 	use an API major/minor number for this purpose. */ | 	use an API major/minor number for this purpose. */ | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user