Skip to content
  • Steven Murray's avatar
    sstrerror_r now calls the POSIX version of strerror_r · 6129011a
    Steven Murray authored
    The CASTOR/SHIFT function sstrerror_r() should call the "standard"
    function strerror_r().  Before this modification the "standard"
    strerror() function was being called which is not guranteed to be
    thread safe.
    
    Compiling the CASTOR/SHIFT function sstrerror_r() code as C++ code
    as opposed to C code makes the GNU compiler check the return type
    of the "standard" function strerror_r().
    
    The return type of the "standard" function strerror_r() is char *
    for the GNU version and int for the POSIX version.
    
    The following two conditions must be true in order to use the
    POSIX version of strerror_r():
    
    1. _GNU_SOURCE must NOT be defined
    2. Either _XOPEN_SOURCE should be defined as 600 or
       _POSIX_C_SOURCE should be defined as 200112L
    6129011a