File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change 100100#endif  // (__cplusplus) >= 202002L 
101101
102102/// Define a C symbol with weak linkage. 
103+ #ifdef  _WIN32 
104+ #define  ET_WEAK 
105+ #else 
103106#define  ET_WEAK  __attribute__((weak))
107+ #endif 
104108
105109/** 
106110 * Annotation marking a function as printf-like, providing compiler support 
107111 * for format string argument checking. 
108112 */ 
113+ #ifdef  _MSC_VER 
114+ #include  <sal.h> 
115+ #define  ET_PRINTFLIKE (_string_index , _va_index ) _Printf_format_string_
116+ #else 
109117#define  ET_PRINTFLIKE (_string_index , _va_index ) \
110118  __attribute__((format(printf, _string_index, _va_index)))
119+ #endif 
111120
121+ #if  __has_builtin (__builtin_strrchr )
112122/// Name of the source file without a directory string. 
113123#define  ET_SHORT_FILENAME  (__builtin_strrchr("/" __FILE__, '/') + 1)
124+ #else 
125+ #include  <cstring> 
126+ #define  ET_SHORT_FILENAME  (strchr("/" __FILE__, '/') + 1)
127+ #endif 
114128
115129#ifndef  __has_builtin 
116130#define  __has_builtin (x ) (0)
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments