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 @@ -425,6 +425,15 @@ CHECK_FUNCTION_EXISTS (asprintf          ${HDF_PREFIX}_HAVE_ASPRINTF)
425425CHECK_FUNCTION_EXISTS (vasprintf         ${HDF_PREFIX} _HAVE_VASPRINTF)
426426CHECK_FUNCTION_EXISTS (waitpid           ${HDF_PREFIX} _HAVE_WAITPID)
427427
428+ # Check for reentrant qsort variants (qsort_r on Unix/BSD, qsort_s on Windows) 
429+ # Note: qsort_r has different signatures on GNU/Linux vs BSD/macOS, but we just 
430+ # check for existence here. Signature differences will be handled in the code. 
431+ CHECK_FUNCTION_EXISTS (qsort_r _HAVE_QSORT_R_TMP)
432+ CHECK_FUNCTION_EXISTS (qsort_s _HAVE_QSORT_S_TMP)
433+ if  (_HAVE_QSORT_R_TMP OR  _HAVE_QSORT_S_TMP)
434+   set  (${HDF_PREFIX} _HAVE_QSORT_REENTRANT 1)
435+ endif  ()
436+ 
428437#----------------------------------------------------------------------------- 
429438# sigsetjmp is special; may actually be a macro 
430439#----------------------------------------------------------------------------- 
Original file line number Diff line number Diff line change 270270/* Define to 1 if you have the <pwd.h> header file. */ 
271271#cmakedefine  H5_HAVE_PWD_H @H5_HAVE_PWD_H@
272272
273+ /* Define to 1 if you have a reentrant qsort function (qsort_r or qsort_s). */ 
274+ #cmakedefine  H5_HAVE_QSORT_REENTRANT @H5_HAVE_QSORT_REENTRANT@
275+ 
273276/* Define whether the Read-Only S3 virtual file driver (VFD) should be 
274277   compiled */ 
275278#cmakedefine  H5_HAVE_ROS3_VFD @H5_HAVE_ROS3_VFD@
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments