From af66914c1151533ced12bca6e8a7ec14348bdb9e Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Wed, 19 Nov 2014 17:12:03 +0100 Subject: system.h -> system.hxx Change-Id: I39a60d0b775bfe40fa89e8b5d5f7466d0db5d36e --- sal/osl/unx/conditn.cxx | 2 +- sal/osl/unx/file.cxx | 2 +- sal/osl/unx/file_misc.cxx | 2 +- sal/osl/unx/file_stat.cxx | 2 +- sal/osl/unx/file_url.cxx | 2 +- sal/osl/unx/file_volume.cxx | 2 +- sal/osl/unx/interlck.cxx | 2 +- sal/osl/unx/module.cxx | 2 +- sal/osl/unx/mutex.cxx | 2 +- sal/osl/unx/nlsupport.cxx | 2 +- sal/osl/unx/pipe.cxx | 2 +- sal/osl/unx/process.cxx | 2 +- sal/osl/unx/profile.cxx | 2 +- sal/osl/unx/readwrite_helper.cxx | 2 +- sal/osl/unx/security.cxx | 2 +- sal/osl/unx/signal.cxx | 2 +- sal/osl/unx/socket.cxx | 2 +- sal/osl/unx/system.cxx | 2 +- sal/osl/unx/system.h | 409 --------------------------------------- sal/osl/unx/system.hxx | 403 ++++++++++++++++++++++++++++++++++++++ sal/osl/unx/tempfile.cxx | 2 +- sal/osl/unx/thread.cxx | 2 +- sal/osl/unx/time.cxx | 2 +- sal/osl/unx/uunxapi.cxx | 2 +- 24 files changed, 425 insertions(+), 431 deletions(-) delete mode 100644 sal/osl/unx/system.h create mode 100644 sal/osl/unx/system.hxx (limited to 'sal/osl') diff --git a/sal/osl/unx/conditn.cxx b/sal/osl/unx/conditn.cxx index 36fd44abd346..1ba0f842dfbc 100644 --- a/sal/osl/unx/conditn.cxx +++ b/sal/osl/unx/conditn.cxx @@ -21,7 +21,7 @@ #include -#include "system.h" +#include "system.hxx" #include #include diff --git a/sal/osl/unx/file.cxx b/sal/osl/unx/file.cxx index a8b004bec863..659526bcd6ea 100644 --- a/sal/osl/unx/file.cxx +++ b/sal/osl/unx/file.cxx @@ -30,7 +30,7 @@ #include -#include "system.h" +#include "system.hxx" #include "createfilehandlefromfd.hxx" #include "file_error_transl.hxx" #include "file_impl.hxx" diff --git a/sal/osl/unx/file_misc.cxx b/sal/osl/unx/file_misc.cxx index 658e0a66c0bf..44095fab9119 100644 --- a/sal/osl/unx/file_misc.cxx +++ b/sal/osl/unx/file_misc.cxx @@ -26,7 +26,7 @@ #include "rtl/alloc.h" #include -#include "system.h" +#include "system.hxx" #include "file_impl.hxx" #include "file_error_transl.hxx" #include "file_path_helper.hxx" diff --git a/sal/osl/unx/file_stat.cxx b/sal/osl/unx/file_stat.cxx index c589e4049461..ab61199f212b 100644 --- a/sal/osl/unx/file_stat.cxx +++ b/sal/osl/unx/file_stat.cxx @@ -19,7 +19,7 @@ #include "osl/file.h" -#include "system.h" +#include "system.hxx" #include #include #include diff --git a/sal/osl/unx/file_url.cxx b/sal/osl/unx/file_url.cxx index 1ce642453806..30c03ba2eebc 100644 --- a/sal/osl/unx/file_url.cxx +++ b/sal/osl/unx/file_url.cxx @@ -19,7 +19,7 @@ #include "file_url.hxx" -#include "system.h" +#include "system.hxx" #include #include diff --git a/sal/osl/unx/file_volume.cxx b/sal/osl/unx/file_volume.cxx index c530eb007ee9..f99092d815a7 100644 --- a/sal/osl/unx/file_volume.cxx +++ b/sal/osl/unx/file_volume.cxx @@ -25,7 +25,7 @@ #include "file_error_transl.hxx" #include "file_url.hxx" -#include "system.h" +#include "system.hxx" #include #include diff --git a/sal/osl/unx/interlck.cxx b/sal/osl/unx/interlck.cxx index 025d8dcbe7a5..01e8da4ebbaf 100644 --- a/sal/osl/unx/interlck.cxx +++ b/sal/osl/unx/interlck.cxx @@ -17,7 +17,7 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#include "system.h" +#include "system.hxx" #include #include diff --git a/sal/osl/unx/module.cxx b/sal/osl/unx/module.cxx index cb0e76372d4e..e8ae7b59d418 100644 --- a/sal/osl/unx/module.cxx +++ b/sal/osl/unx/module.cxx @@ -26,7 +26,7 @@ #include #include #include -#include "system.h" +#include "system.hxx" #include "file_url.hxx" #ifdef AIX diff --git a/sal/osl/unx/mutex.cxx b/sal/osl/unx/mutex.cxx index 62f212f15a93..5898622c0754 100644 --- a/sal/osl/unx/mutex.cxx +++ b/sal/osl/unx/mutex.cxx @@ -23,7 +23,7 @@ #define _GNU_SOURCE 1 #endif #endif -#include "system.h" +#include "system.hxx" #include #include diff --git a/sal/osl/unx/nlsupport.cxx b/sal/osl/unx/nlsupport.cxx index a7e764059936..93cc85976994 100644 --- a/sal/osl/unx/nlsupport.cxx +++ b/sal/osl/unx/nlsupport.cxx @@ -836,7 +836,7 @@ rtl_TextEncoding osl_getTextEncodingFromLocale( rtl_Locale * pLocale ) } #if defined(MACOSX) || defined(IOS) -#include "system.h" +#include "system.hxx" /***************************************************************************** return the current process locale diff --git a/sal/osl/unx/pipe.cxx b/sal/osl/unx/pipe.cxx index 12e9b6a8d03e..b1b5a7649ef5 100644 --- a/sal/osl/unx/pipe.cxx +++ b/sal/osl/unx/pipe.cxx @@ -17,7 +17,7 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#include "system.h" +#include "system.hxx" #include #include diff --git a/sal/osl/unx/process.cxx b/sal/osl/unx/process.cxx index 537b1eb73850..7355ac97a57d 100644 --- a/sal/osl/unx/process.cxx +++ b/sal/osl/unx/process.cxx @@ -40,7 +40,7 @@ #include #endif -#include "system.h" +#include "system.hxx" #if defined(SOLARIS) # include #endif diff --git a/sal/osl/unx/profile.cxx b/sal/osl/unx/profile.cxx index a47bdbc0f3bf..6c54f6aa02a5 100644 --- a/sal/osl/unx/profile.cxx +++ b/sal/osl/unx/profile.cxx @@ -17,7 +17,7 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#include "system.h" +#include "system.hxx" #include "readwrite_helper.hxx" #include "file_url.hxx" diff --git a/sal/osl/unx/readwrite_helper.cxx b/sal/osl/unx/readwrite_helper.cxx index 949712862f2b..68caa176690d 100644 --- a/sal/osl/unx/readwrite_helper.cxx +++ b/sal/osl/unx/readwrite_helper.cxx @@ -10,7 +10,7 @@ #include "readwrite_helper.hxx" #include -#include +#include bool safeWrite(int fd, void* data, sal_uInt32 dataSize) { diff --git a/sal/osl/unx/security.cxx b/sal/osl/unx/security.cxx index 3e67de7f27d5..d569d1dd8640 100644 --- a/sal/osl/unx/security.cxx +++ b/sal/osl/unx/security.cxx @@ -28,7 +28,7 @@ #include #endif -#include "system.h" +#include "system.hxx" #include #include diff --git a/sal/osl/unx/signal.cxx b/sal/osl/unx/signal.cxx index 75d3329fcb22..890b73e523c9 100644 --- a/sal/osl/unx/signal.cxx +++ b/sal/osl/unx/signal.cxx @@ -22,7 +22,7 @@ #include /* system headers */ -#include "system.h" +#include "system.hxx" #if defined( MACOSX ) diff --git a/sal/osl/unx/socket.cxx b/sal/osl/unx/socket.cxx index 4e65858f7485..f9836af376b8 100644 --- a/sal/osl/unx/socket.cxx +++ b/sal/osl/unx/socket.cxx @@ -17,7 +17,7 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#include "system.h" +#include "system.hxx" #include #include diff --git a/sal/osl/unx/system.cxx b/sal/osl/unx/system.cxx index cb5734dc9d44..6fae151cb2f4 100644 --- a/sal/osl/unx/system.cxx +++ b/sal/osl/unx/system.cxx @@ -22,7 +22,7 @@ #include -#include "system.h" +#include "system.hxx" #ifdef NO_PTHREAD_RTL diff --git a/sal/osl/unx/system.h b/sal/osl/unx/system.h deleted file mode 100644 index b3162f17dcde..000000000000 --- a/sal/osl/unx/system.h +++ /dev/null @@ -1,409 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ - -#ifndef INCLUDED_SAL_OSL_UNX_SYSTEM_H -#define INCLUDED_SAL_OSL_UNX_SYSTEM_H - -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include - -#include - -#include - -#include -#include - -#include - -/* Make sockets of type AF_UNIX use underlying FS rights */ -#if defined(SOLARIS) && !defined(_XOPEN_SOURCE) -# define _XOPEN_SOURCE 500 -# include -# undef _XOPEN_SOURCE -#else -# include -#endif - -#include -#include - -#ifdef SYSV -# include -#endif - -#ifdef LINUX -# ifndef __USE_GNU -# define __USE_GNU -# endif - -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# if __BYTE_ORDER == __LITTLE_ENDIAN -# define _LITTLE_ENDIAN -# elif __BYTE_ORDER == __BIG_ENDIAN -# ifndef _BIG_ENDIAN -# define _BIG_ENDIAN -# endif -# endif -# define IORESOURCE_TRANSFER_BSD -# define IOCHANNEL_TRANSFER_BSD_RENO -# define pthread_testcancel() -# define NO_PTHREAD_PRIORITY -# define PTHREAD_SIGACTION pthread_sigaction - -# ifndef ETIME -# define ETIME ETIMEDOUT -# endif - -#endif - -#ifdef ANDROID -# include -# include -# include -# include -# include -# include -# include -# include -# include -# define IORESOURCE_TRANSFER_BSD -# define IOCHANNEL_TRANSFER_BSD_RENO -# define pthread_testcancel() -# define NO_PTHREAD_PRIORITY -#endif - -#ifdef NETBSD -# define NO_PTHREAD_RTL -#endif - -#ifdef FREEBSD -# define ETIME ETIMEDOUT -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# define IORESOURCE_TRANSFER_BSD -# include -# define NO_PTHREAD_RTL -#endif - -#ifdef OPENBSD -# define ETIME ETIMEDOUT -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# define IORESOURCE_TRANSFER_BSD -# include -# define PTR_SIZE_T(s) ((size_t *)&(s)) -# define IORESOURCE_TRANSFER_BSD -# define IOCHANNEL_TRANSFER_BSD_RENO -# define pthread_testcancel() -# define NO_PTHREAD_PRIORITY -# define NO_PTHREAD_RTL -# define PTHREAD_SIGACTION pthread_sigaction -#endif - -#if defined(DRAGONFLY) || defined(NETBSD) -# define ETIME ETIMEDOUT -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# define IORESOURCE_TRANSFER_BSD -# define IOCHANNEL_TRANSFER_BSD_RENO -#endif - -#ifdef AIX -# define AF_IPX -1 -# include -# include -# include -# include -# include -# include -# include -# if BYTE_ORDER == LITTLE_ENDIAN -# ifndef _LITTLE_ENDIAN -# define _LITTLE_ENDIAN -# endif -# elif BYTE_ORDER == BIG_ENDIAN -# ifndef _BIG_ENDIAN -# define _BIG_ENDIAN -# endif -# endif -# define SLEEP_TIMESPEC(timespec) nsleep(×pec, 0) -# define LIBPATH "LIBPATH" -#endif - -#ifdef SOLARIS -# include -# include -# include -# include -# include -# include -# include -# include -# define IORESOURCE_TRANSFER_SYSV -# define IOCHANNEL_TRANSFER_BSD -# define LIBPATH "LD_LIBRARY_PATH" -#endif - -#ifdef MACOSX -#define __OPENTRANSPORTPROVIDERS__ // these are already defined -#define TimeValue CFTimeValue // Do not conflict with TimeValue in sal/inc/osl/time.h -#include -#undef TimeValue -# ifndef ETIME -# define ETIME ETIMEDOUT -# endif -# include -# include -# include -# include -# include -# include -# include -# include -# include -/* fixme are premac and postmac still needed here? */ -# include -# include -# include -# if BYTE_ORDER == LITTLE_ENDIAN -# ifndef _LITTLE_ENDIAN -# define _LITTLE_ENDIAN -# endif -# elif BYTE_ORDER == BIG_ENDIAN -# ifndef _BIG_ENDIAN -# define _BIG_ENDIAN -# endif -# endif -# define IOCHANNEL_TRANSFER_BSD_RENO -# define NO_PTHREAD_RTL -/* for NSGetArgc/Argv/Environ */ -# include -#ifdef __cplusplus -extern "C" { -#endif -int macxp_resolveAlias(char *path, int buflen); -#ifdef __cplusplus -} -#endif -#endif - -#ifdef IOS -# ifndef ETIME -# define ETIME ETIMEDOUT -# endif -# include -# include -# include -# include -# include -# include -# include -# include -# include -# if BYTE_ORDER == LITTLE_ENDIAN -# ifndef _LITTLE_ENDIAN -# define _LITTLE_ENDIAN -# endif -# elif BYTE_ORDER == BIG_ENDIAN -# ifndef _BIG_ENDIAN -# define _BIG_ENDIAN -# endif -# endif -# define IOCHANNEL_TRANSFER_BSD_RENO -# define NO_PTHREAD_RTL -#endif - -#if !defined(_WIN32) && \ - !defined(LINUX) && !defined(NETBSD) && !defined(FREEBSD) && \ - !defined(AIX) && \ - !defined(SOLARIS) && !defined(MACOSX) && \ - !defined(OPENBSD) && !defined(DRAGONFLY) && \ - !defined(IOS) && !defined(ANDROID) -# error "Target platform not specified!" -#endif - -#ifndef PTR_FD_SET -# define PTR_FD_SET(s) (&(s)) -#endif - -#ifndef NORMALIZE_TIMESPEC -# define NORMALIZE_TIMESPEC(timespec) \ - timespec . tv_sec += timespec . tv_nsec / 1000000000; \ - timespec . tv_nsec %= 1000000000; -#endif - -#ifndef SET_TIMESPEC -# define SET_TIMESPEC(timespec, sec, nsec) \ - timespec . tv_sec = (sec); \ - timespec . tv_nsec = (nsec); \ - NORMALIZE_TIMESPEC(timespec); -#endif - -#ifndef SLEEP_TIMESPEC -# define SLEEP_TIMESPEC(timespec) nanosleep(×pec, 0) -#endif - -#ifndef INIT_GROUPS -# define INIT_GROUPS(name, gid) ((setgid((gid)) == 0) && (initgroups((name), (gid)) == 0)) -#endif - -#ifndef PTHREAD_VALUE -# define PTHREAD_VALUE(t) (t) -#endif -#ifndef PTHREAD_NONE -# define PTHREAD_NONE _pthread_none_ -# ifndef PTHREAD_NONE_INIT -# define PTHREAD_NONE_INIT ((pthread_t)-1) -# endif -#endif - -#ifndef PTHREAD_ATTR_DEFAULT -# define PTHREAD_ATTR_DEFAULT NULL -#endif -#ifndef PTHREAD_MUTEXATTR_DEFAULT -# define PTHREAD_MUTEXATTR_DEFAULT NULL -#endif -#ifndef PTHREAD_CONDATTR_DEFAULT -# define PTHREAD_CONDATTR_DEFAULT NULL -#endif - -#ifndef PTHREAD_SIGACTION -# define PTHREAD_SIGACTION sigaction -#endif - -#ifndef STAT_PARENT -# define STAT_PARENT lstat -#endif - -/* socket options which might not be defined on all unx flavors */ -#ifndef SO_ACCEPTCONN -# define SO_ACCEPTCONN 0 -#endif -#ifndef SO_SNDLOWAT -# define SO_SNDLOWAT 0 -#endif -#ifndef SO_RCVLOWAT -# define SO_RCVLOWAT 0 -#endif -#ifndef SO_SNDTIMEO -# define SO_SNDTIMEO 0 -#endif -#ifndef SO_RCVTIMEO -# define SO_RCVTIMEO 0 -#endif -#ifndef SO_USELOOPBACK -# define SO_USELOOPBACK 0 -#endif -#ifndef MSG_MAXIOVLEN -# define MSG_MAXIOVLEN 0 -#endif - -/* BEGIN HACK */ -/* dummy define and declarations for IPX should be replaced by */ -/* original ipx headers when these are available for this platform */ - -#ifndef SA_FAMILY_DECL -# define SA_FAMILY_DECL short sa_family -#endif - -typedef struct sockaddr_ipx { - SA_FAMILY_DECL; - char sa_netnum[4]; - char sa_nodenum[6]; - unsigned short sa_socket; -} SOCKADDR_IPX; - -#define NSPROTO_IPX 1000 -#define NSPROTO_SPX 1256 -#define NSPROTO_SPXII 1257 - -/* END HACK */ - -#ifdef NO_PTHREAD_RTL -#if !defined FREEBSD -#if !defined NETBSD -struct passwd *getpwent_r(struct passwd *pwd, char *buffer, int buflen); -#endif -extern struct spwd *getspnam_r(const char *name, struct spwd *result, - char *buffer, int buflen); - -#if !defined MACOSX -struct tm *localtime_r(const time_t *timep, struct tm *buffer); -struct tm *gmtime_r(const time_t *timep, struct tm *buffer); -#endif -struct hostent *gethostbyname_r(const char *name, struct hostent *result, - char *buffer, size_t buflen, int *h_errnop); -#endif /* !defined(FREEBSD) */ -#endif - -#endif // INCLUDED_SAL_OSL_UNX_SYSTEM_H - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sal/osl/unx/system.hxx b/sal/osl/unx/system.hxx new file mode 100644 index 000000000000..3013e91c6341 --- /dev/null +++ b/sal/osl/unx/system.hxx @@ -0,0 +1,403 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef INCLUDED_SAL_OSL_UNX_SYSTEM_HXX +#define INCLUDED_SAL_OSL_UNX_SYSTEM_HXX + +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include + +#include + +#include + +#include +#include + +#include + +/* Make sockets of type AF_UNIX use underlying FS rights */ +#if defined(SOLARIS) && !defined(_XOPEN_SOURCE) +# define _XOPEN_SOURCE 500 +# include +# undef _XOPEN_SOURCE +#else +# include +#endif + +#include +#include + +#ifdef SYSV +# include +#endif + +#ifdef LINUX +# ifndef __USE_GNU +# define __USE_GNU +# endif + +# include +# include +# include +# include +# include +# include +# include +# include +# include +# include +# if __BYTE_ORDER == __LITTLE_ENDIAN +# define _LITTLE_ENDIAN +# elif __BYTE_ORDER == __BIG_ENDIAN +# ifndef _BIG_ENDIAN +# define _BIG_ENDIAN +# endif +# endif +# define IORESOURCE_TRANSFER_BSD +# define IOCHANNEL_TRANSFER_BSD_RENO +# define pthread_testcancel() +# define NO_PTHREAD_PRIORITY +# define PTHREAD_SIGACTION pthread_sigaction + +# ifndef ETIME +# define ETIME ETIMEDOUT +# endif + +#endif + +#ifdef ANDROID +# include +# include +# include +# include +# include +# include +# include +# include +# include +# define IORESOURCE_TRANSFER_BSD +# define IOCHANNEL_TRANSFER_BSD_RENO +# define pthread_testcancel() +# define NO_PTHREAD_PRIORITY +#endif + +#ifdef NETBSD +# define NO_PTHREAD_RTL +#endif + +#ifdef FREEBSD +# define ETIME ETIMEDOUT +# include +# include +# include +# include +# include +# include +# include +# include +# include +# include +# include +# include +# include +# include +# include +# define IORESOURCE_TRANSFER_BSD +# include +# define NO_PTHREAD_RTL +#endif + +#ifdef OPENBSD +# define ETIME ETIMEDOUT +# include +# include +# include +# include +# include +# include +# include +# include +# include +# include +# include +# define IORESOURCE_TRANSFER_BSD +# include +# define PTR_SIZE_T(s) ((size_t *)&(s)) +# define IORESOURCE_TRANSFER_BSD +# define IOCHANNEL_TRANSFER_BSD_RENO +# define pthread_testcancel() +# define NO_PTHREAD_PRIORITY +# define NO_PTHREAD_RTL +# define PTHREAD_SIGACTION pthread_sigaction +#endif + +#if defined(DRAGONFLY) || defined(NETBSD) +# define ETIME ETIMEDOUT +# include +# include +# include +# include +# include +# include +# include +# include +# include +# include +# include +# include +# define IORESOURCE_TRANSFER_BSD +# define IOCHANNEL_TRANSFER_BSD_RENO +#endif + +#ifdef AIX +# define AF_IPX -1 +# include +# include +# include +# include +# include +# include +# include +# if BYTE_ORDER == LITTLE_ENDIAN +# ifndef _LITTLE_ENDIAN +# define _LITTLE_ENDIAN +# endif +# elif BYTE_ORDER == BIG_ENDIAN +# ifndef _BIG_ENDIAN +# define _BIG_ENDIAN +# endif +# endif +# define SLEEP_TIMESPEC(timespec) nsleep(×pec, 0) +# define LIBPATH "LIBPATH" +#endif + +#ifdef SOLARIS +# include +# include +# include +# include +# include +# include +# include +# include +# define IORESOURCE_TRANSFER_SYSV +# define IOCHANNEL_TRANSFER_BSD +# define LIBPATH "LD_LIBRARY_PATH" +#endif + +#ifdef MACOSX +#define __OPENTRANSPORTPROVIDERS__ // these are already defined +#define TimeValue CFTimeValue // Do not conflict with TimeValue in sal/inc/osl/time.h +#include +#undef TimeValue +# ifndef ETIME +# define ETIME ETIMEDOUT +# endif +# include +# include +# include +# include +# include +# include +# include +# include +# include +/* fixme are premac and postmac still needed here? */ +# include +# include +# include +# if BYTE_ORDER == LITTLE_ENDIAN +# ifndef _LITTLE_ENDIAN +# define _LITTLE_ENDIAN +# endif +# elif BYTE_ORDER == BIG_ENDIAN +# ifndef _BIG_ENDIAN +# define _BIG_ENDIAN +# endif +# endif +# define IOCHANNEL_TRANSFER_BSD_RENO +# define NO_PTHREAD_RTL +/* for NSGetArgc/Argv/Environ */ +# include +int macxp_resolveAlias(char *path, int buflen); +#endif + +#ifdef IOS +# ifndef ETIME +# define ETIME ETIMEDOUT +# endif +# include +# include +# include +# include +# include +# include +# include +# include +# include +# if BYTE_ORDER == LITTLE_ENDIAN +# ifndef _LITTLE_ENDIAN +# define _LITTLE_ENDIAN +# endif +# elif BYTE_ORDER == BIG_ENDIAN +# ifndef _BIG_ENDIAN +# define _BIG_ENDIAN +# endif +# endif +# define IOCHANNEL_TRANSFER_BSD_RENO +# define NO_PTHREAD_RTL +#endif + +#if !defined(_WIN32) && \ + !defined(LINUX) && !defined(NETBSD) && !defined(FREEBSD) && \ + !defined(AIX) && \ + !defined(SOLARIS) && !defined(MACOSX) && \ + !defined(OPENBSD) && !defined(DRAGONFLY) && \ + !defined(IOS) && !defined(ANDROID) +# error "Target platform not specified!" +#endif + +#ifndef PTR_FD_SET +# define PTR_FD_SET(s) (&(s)) +#endif + +#ifndef NORMALIZE_TIMESPEC +# define NORMALIZE_TIMESPEC(timespec) \ + timespec . tv_sec += timespec . tv_nsec / 1000000000; \ + timespec . tv_nsec %= 1000000000; +#endif + +#ifndef SET_TIMESPEC +# define SET_TIMESPEC(timespec, sec, nsec) \ + timespec . tv_sec = (sec); \ + timespec . tv_nsec = (nsec); \ + NORMALIZE_TIMESPEC(timespec); +#endif + +#ifndef SLEEP_TIMESPEC +# define SLEEP_TIMESPEC(timespec) nanosleep(×pec, 0) +#endif + +#ifndef INIT_GROUPS +# define INIT_GROUPS(name, gid) ((setgid((gid)) == 0) && (initgroups((name), (gid)) == 0)) +#endif + +#ifndef PTHREAD_VALUE +# define PTHREAD_VALUE(t) (t) +#endif +#ifndef PTHREAD_NONE +# define PTHREAD_NONE _pthread_none_ +# ifndef PTHREAD_NONE_INIT +# define PTHREAD_NONE_INIT ((pthread_t)-1) +# endif +#endif + +#ifndef PTHREAD_ATTR_DEFAULT +# define PTHREAD_ATTR_DEFAULT NULL +#endif +#ifndef PTHREAD_MUTEXATTR_DEFAULT +# define PTHREAD_MUTEXATTR_DEFAULT NULL +#endif +#ifndef PTHREAD_CONDATTR_DEFAULT +# define PTHREAD_CONDATTR_DEFAULT NULL +#endif + +#ifndef PTHREAD_SIGACTION +# define PTHREAD_SIGACTION sigaction +#endif + +#ifndef STAT_PARENT +# define STAT_PARENT lstat +#endif + +/* socket options which might not be defined on all unx flavors */ +#ifndef SO_ACCEPTCONN +# define SO_ACCEPTCONN 0 +#endif +#ifndef SO_SNDLOWAT +# define SO_SNDLOWAT 0 +#endif +#ifndef SO_RCVLOWAT +# define SO_RCVLOWAT 0 +#endif +#ifndef SO_SNDTIMEO +# define SO_SNDTIMEO 0 +#endif +#ifndef SO_RCVTIMEO +# define SO_RCVTIMEO 0 +#endif +#ifndef SO_USELOOPBACK +# define SO_USELOOPBACK 0 +#endif +#ifndef MSG_MAXIOVLEN +# define MSG_MAXIOVLEN 0 +#endif + +/* BEGIN HACK */ +/* dummy define and declarations for IPX should be replaced by */ +/* original ipx headers when these are available for this platform */ + +#ifndef SA_FAMILY_DECL +# define SA_FAMILY_DECL short sa_family +#endif + +typedef struct sockaddr_ipx { + SA_FAMILY_DECL; + char sa_netnum[4]; + char sa_nodenum[6]; + unsigned short sa_socket; +} SOCKADDR_IPX; + +#define NSPROTO_IPX 1000 +#define NSPROTO_SPX 1256 +#define NSPROTO_SPXII 1257 + +/* END HACK */ + +#ifdef NO_PTHREAD_RTL +#if !defined FREEBSD +#if !defined NETBSD +struct passwd *getpwent_r(struct passwd *pwd, char *buffer, int buflen); +#endif +extern struct spwd *getspnam_r(const char *name, struct spwd *result, + char *buffer, int buflen); + +#if !defined MACOSX +struct tm *localtime_r(const time_t *timep, struct tm *buffer); +struct tm *gmtime_r(const time_t *timep, struct tm *buffer); +#endif +struct hostent *gethostbyname_r(const char *name, struct hostent *result, + char *buffer, size_t buflen, int *h_errnop); +#endif /* !defined(FREEBSD) */ +#endif + +#endif // INCLUDED_SAL_OSL_UNX_SYSTEM_H + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sal/osl/unx/tempfile.cxx b/sal/osl/unx/tempfile.cxx index 204535c455aa..38cc0b83502f 100644 --- a/sal/osl/unx/tempfile.cxx +++ b/sal/osl/unx/tempfile.cxx @@ -22,7 +22,7 @@ #include #include #include -#include "system.h" +#include "system.hxx" #include #include #include diff --git a/sal/osl/unx/thread.cxx b/sal/osl/unx/thread.cxx index f681175081bc..78843eae09a7 100644 --- a/sal/osl/unx/thread.cxx +++ b/sal/osl/unx/thread.cxx @@ -20,7 +20,7 @@ #include #include -#include "system.h" +#include "system.hxx" #include #if defined(OPENBSD) #include diff --git a/sal/osl/unx/time.cxx b/sal/osl/unx/time.cxx index aba39d525b79..1fbd2fb2fe9a 100644 --- a/sal/osl/unx/time.cxx +++ b/sal/osl/unx/time.cxx @@ -20,7 +20,7 @@ #include #include "saltime.hxx" -#include "system.h" +#include "system.hxx" #include #include diff --git a/sal/osl/unx/uunxapi.cxx b/sal/osl/unx/uunxapi.cxx index c28491ce519b..a98481622c4c 100644 --- a/sal/osl/unx/uunxapi.cxx +++ b/sal/osl/unx/uunxapi.cxx @@ -20,7 +20,7 @@ #include #include "uunxapi.hxx" -#include "system.h" +#include "system.hxx" #include #include #include -- cgit