File tree Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -443,6 +443,15 @@ CHECK_FUNCTION_EXISTS (asprintf          ${HDF_PREFIX}_HAVE_ASPRINTF)
443443CHECK_FUNCTION_EXISTS (vasprintf         ${HDF_PREFIX} _HAVE_VASPRINTF)
444444CHECK_FUNCTION_EXISTS (waitpid           ${HDF_PREFIX} _HAVE_WAITPID)
445445
446+ # Check for reentrant qsort variants (qsort_r on Unix/BSD, qsort_s on Windows) 
447+ # Note: qsort_r has different signatures on GNU/Linux vs BSD/macOS, but we just 
448+ # check for existence here. Signature differences will be handled in the code. 
449+ CHECK_FUNCTION_EXISTS (qsort_r _HAVE_QSORT_R_TMP)
450+ CHECK_FUNCTION_EXISTS (qsort_s _HAVE_QSORT_S_TMP)
451+ if  (_HAVE_QSORT_R_TMP OR  _HAVE_QSORT_S_TMP)
452+   set  (${HDF_PREFIX} _HAVE_QSORT_REENTRANT 1)
453+ endif  ()
454+ 
446455#----------------------------------------------------------------------------- 
447456# sigsetjmp is special; may actually be a macro 
448457#----------------------------------------------------------------------------- 
Original file line number Diff line number Diff line change 258258/* Define to 1 if you have the <pwd.h> header file. */ 
259259#cmakedefine  H5_HAVE_PWD_H @H5_HAVE_PWD_H@
260260
261+ /* Define to 1 if you have a reentrant qsort function (qsort_r or qsort_s). */ 
262+ #cmakedefine  H5_HAVE_QSORT_REENTRANT @H5_HAVE_QSORT_REENTRANT@
263+ 
261264/* Define whether the Read-Only S3 virtual file driver (VFD) should be 
262265   compiled */ 
263266#cmakedefine  H5_HAVE_ROS3_VFD @H5_HAVE_ROS3_VFD@
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments