Checking whether MinGW really supports threads
This commit is contained in:
		
							parent
							
								
									ebfca14e19
								
							
						
					
					
						commit
						63e64d4beb
					
				@ -171,9 +171,9 @@
 | 
				
			|||||||
	#endif
 | 
						#endif
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
//Assume the std::thread is not implement on MinGW
 | 
					//Assume the std::thread is not implemented on MinGW,
 | 
				
			||||||
 | 
					//unless it was compiled with POSIX threading support.
 | 
				
			||||||
//But some toolchains may implement std::thread.
 | 
					//But some toolchains may implement std::thread.
 | 
				
			||||||
// it seems that MinGW 6.3 and 7.1 have std::thread
 | 
					 | 
				
			||||||
#ifdef NANA_MINGW
 | 
					#ifdef NANA_MINGW
 | 
				
			||||||
#	ifndef STD_THREAD_NOT_SUPPORTED
 | 
					#	ifndef STD_THREAD_NOT_SUPPORTED
 | 
				
			||||||
#		define STD_THREAD_NOT_SUPPORTED
 | 
					#		define STD_THREAD_NOT_SUPPORTED
 | 
				
			||||||
@ -222,7 +222,10 @@
 | 
				
			|||||||
#    undef STD_FILESYSTEM_NOT_SUPPORTED
 | 
					#    undef STD_FILESYSTEM_NOT_SUPPORTED
 | 
				
			||||||
#  endif
 | 
					#  endif
 | 
				
			||||||
#  if __has_include(<mutex>) 
 | 
					#  if __has_include(<mutex>) 
 | 
				
			||||||
#    undef STD_THREAD_NOT_SUPPORTED
 | 
					#    if !(defined(NANA_MINGW) && !defined(_GLIBCXX_HAS_GTHREADS))
 | 
				
			||||||
 | 
					//See the comment above regarding MinGW's threading support
 | 
				
			||||||
 | 
					#      undef STD_THREAD_NOT_SUPPORTED
 | 
				
			||||||
 | 
					#    endif
 | 
				
			||||||
#  endif
 | 
					#  endif
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user