If your build starts to fail due to missing ETIME (was: core.git: sal/osl)

Stephan Bergmann stephan.bergmann at allotropia.de
Tue Mar 26 13:31:06 UTC 2024


FYI, if your (Unix-like-platform) build starts to fail (in 
sal/osl/unx/uunxapi.cxx) due to missing ETIME, please proceed as 
indicated preceding the "SEE HERE" below:

On 3/26/24 14:24, Stephan Bergmann (via logerrit) wrote:
>   sal/osl/unx/system.hxx |   21 ---------------------
>   1 file changed, 21 deletions(-)
> 
> New commits:
> commit 1590e2c359fd3b506b8721d99a0054a0bd4dd200
> Author:     Stephan Bergmann <stephan.bergmann at allotropia.de>
> AuthorDate: Tue Mar 26 09:37:43 2024 +0100
> Commit:     Stephan Bergmann <stephan.bergmann at allotropia.de>
> CommitDate: Tue Mar 26 14:24:06 2024 +0100
> 
>      No need to define ETIME
>      
>      (which is an obsolescent XSI-STREAMS Posix extension).  It's only use is in the
>      big switch in UnixErrnoString in sal/osl/unx/uunxapi.cxx, so if any platform
>      should actually lack it, we should rather #ifdef its use there than introduce it
>      here.

^^^ SEE HERE ^^^

>      (This started to cause
>      
>      > sal/osl/unx/system.hxx:190:12: error: macro 'ETIME' has been marked as deprecated: ETIME is deprecated in ISO C++ [-Werror,-Wdeprecated-pragma]
>      >   190 | #   ifndef ETIME
>      >       |            ^
>      > ~/llvm/inst/bin/../include/c++/v1/cerrno:51:67: note: macro marked 'deprecated' here
>      >    51 | #  pragma clang deprecated(ETIME, "ETIME is deprecated in ISO C++")
>      >       |                                                                   ^
>      
>      with recent LLVM 19 trunk on macOS now.)
>      
>      Change-Id: I01a586f08a4d9e4643c797fce5ce53c5f3ce8b81
>      Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165303
>      Tested-by: Jenkins
>      Reviewed-by: Stephan Bergmann <stephan.bergmann at allotropia.de>
> 
> diff --git a/sal/osl/unx/system.hxx b/sal/osl/unx/system.hxx
> index 5f5a16aa3671..1337913f7abb 100644
> --- a/sal/osl/unx/system.hxx
> +++ b/sal/osl/unx/system.hxx
> @@ -47,10 +47,6 @@
>   #   define  NO_PTHREAD_PRIORITY
>   #   define  PTHREAD_SIGACTION           pthread_sigaction
>   
> -#   ifndef ETIME
> -#       define ETIME ETIMEDOUT
> -#   endif
> -
>   #endif
>   
>   #ifdef HAIKU
> @@ -71,9 +67,6 @@
>   #   define  NO_PTHREAD_RTL
>   #   define  PTHREAD_SIGACTION           pthread_sigaction
>   
> -#   ifndef ETIME
> -#       define ETIME ETIMEDOUT
> -#   endif
>   #   define SIGIOT SIGABRT
>   #   define SOCK_RDM 0
>   //  hack: Haiku defines SOL_SOCKET as -1, but this makes GCC complain about
> @@ -104,9 +97,6 @@
>   #endif
>   
>   #ifdef FREEBSD
> -#   ifndef ETIME
> -#       define ETIME ETIMEDOUT
> -#   endif
>   #   include <pthread.h>
>   #   include <sys/sem.h>
>   #   include <dlfcn.h>
> @@ -128,7 +118,6 @@
>   #endif
>   
>   #ifdef OPENBSD
> -#   define  ETIME ETIMEDOUT
>   #   include <pthread.h>
>   #   include <sys/sem.h>
>   #   include <dlfcn.h>
> @@ -152,7 +141,6 @@
>   #endif
>   
>   #if defined(DRAGONFLY) || defined(NETBSD)
> -#   define  ETIME ETIMEDOUT
>   #   include <pthread.h>
>   #   include <sys/sem.h>
>   #   include <dlfcn.h>
> @@ -187,9 +175,6 @@
>   #define TimeValue CFTimeValue      // Do not conflict with TimeValue in sal/inc/osl/time.h
>   #include <Carbon/Carbon.h>
>   #undef TimeValue
> -#   ifndef ETIME
> -#       define  ETIME ETIMEDOUT
> -#   endif
>   #   include <dlfcn.h>
>   #   include <pthread.h>
>   #   include <sys/file.h>
> @@ -208,9 +193,6 @@ int macxp_resolveAlias(char *path, int buflen);
>   #endif
>   
>   #ifdef IOS
> -#   ifndef ETIME
> -#       define  ETIME ETIMEDOUT
> -#   endif
>   #   include <dlfcn.h>
>   #   include <pthread.h>
>   #   include <sys/file.h>
> @@ -225,9 +207,6 @@ int macxp_resolveAlias(char *path, int buflen);
>   #endif
>   
>   #ifdef EMSCRIPTEN
> -#   ifndef ETIME
> -#       define  ETIME ETIMEDOUT
> -#   endif
>   #   include <pthread.h>
>   #   include <sys/file.h>
>   #   include <sys/ioctl.h>



More information about the LibreOffice mailing list