mirror of
				https://github.com/python/cpython.git
				synced 2025-10-30 21:21:22 +00:00 
			
		
		
		
	bpo-36020: Remove snprintf macro in pyerrors.h (GH-20889)
On Windows, GH-include "pyerrors.h" no longer defines "snprintf" and
"vsnprintf" macros.
PyOS_snprintf() and PyOS_vsnprintf() should be used to get portable
behavior.
Replace snprintf() calls with PyOS_snprintf() and replace vsnprintf()
calls with PyOS_vsnprintf().
(cherry picked from commit e822e37946)
Co-authored-by: Victor Stinner <vstinner@python.org>
			
			
This commit is contained in:
		
							parent
							
								
									9a0624a3d9
								
							
						
					
					
						commit
						b498c7f1b3
					
				
					 6 changed files with 27 additions and 32 deletions
				
			
		|  | @ -473,13 +473,12 @@ remove_unusable_flags(PyObject *m) | |||
| #endif | ||||
| 
 | ||||
| #ifdef MS_WIN32 | ||||
| #undef EAFNOSUPPORT | ||||
| #define EAFNOSUPPORT WSAEAFNOSUPPORT | ||||
| #define snprintf _snprintf | ||||
| #  undef EAFNOSUPPORT | ||||
| #  define EAFNOSUPPORT WSAEAFNOSUPPORT | ||||
| #endif | ||||
| 
 | ||||
| #ifndef SOCKETCLOSE | ||||
| #define SOCKETCLOSE close | ||||
| #  define SOCKETCLOSE close | ||||
| #endif | ||||
| 
 | ||||
| #if (defined(HAVE_BLUETOOTH_H) || defined(HAVE_BLUETOOTH_BLUETOOTH_H)) && !defined(__NetBSD__) && !defined(__DragonFly__) | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Miss Islington (bot)
						Miss Islington (bot)