mirror of https://github.com/nirenjan/pinelog.git
				
				
				
			Use strrchr only if the compiler supports __builtin_strrchr
							parent
							
								
									204aadead0
								
							
						
					
					
						commit
						0256807417
					
				|  | @ -98,7 +98,13 @@ static int test_setup(int level, int filter, const char *file, int line) | ||||||
|         } |         } | ||||||
| 
 | 
 | ||||||
|         if (PINELOG_SHOW_BACKTRACE) { |         if (PINELOG_SHOW_BACKTRACE) { | ||||||
|             char * basename = strrchr(file, '/'); |             char * basename = NULL; | ||||||
|  |             #if defined __has_builtin | ||||||
|  |             #if __has_builtin(__builtin_strrchr) | ||||||
|  |             basename = strrchr(file, '/'); | ||||||
|  |             #endif | ||||||
|  |             #endif | ||||||
|  | 
 | ||||||
|             if (basename != NULL) { |             if (basename != NULL) { | ||||||
|                 basename++; |                 basename++; | ||||||
|             } else { |             } else { | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue