Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions TSRM/threads.m4
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,6 @@ AC_DEFUN([PTHREADS_FLAGS],[
PTHREAD_FLAGS=-D_REENTRANT;;
*aix*)
PTHREAD_FLAGS=-D_THREAD_SAFE;;
*hpux*)
PTHREAD_FLAGS=-D_REENTRANT;;
*sco*)
PTHREAD_FLAGS=-D_REENTRANT;;
esac
Expand Down Expand Up @@ -91,13 +89,12 @@ dnl -mthreads gcc (AIX)
dnl -pthread gcc (Linux, FreeBSD, NetBSD, OpenBSD)
dnl -pthreads gcc (Solaris)
dnl -qthreaded AIX cc V5
dnl -threads gcc (HP-UX)
dnl
AC_DEFUN([PTHREADS_CHECK],[
AC_CACHE_CHECK(for pthreads_cflags,ac_cv_pthreads_cflags,[
ac_cv_pthreads_cflags=
if test "$pthreads_working" != "yes"; then
for flag in -kthread -pthread -pthreads -mthreads -Kthread -threads -mt -qthreaded; do
for flag in -kthread -pthread -pthreads -mthreads -Kthread -mt -qthreaded; do
ac_save=$CFLAGS
CFLAGS="$CFLAGS $flag"
PTHREADS_CHECK_COMPILE
Expand Down
1 change: 1 addition & 0 deletions UPGRADING.INTERNALS
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ PHP 8.6 INTERNALS UPGRADE NOTES
- Unix build system changes:
. Symbol HAVE_ST_BLOCKS has been removed from php_config.h (use
HAVE_STRUCT_STAT_ST_BLOCKS).
. Support for HP-UX has been removed.

========================
3. Module changes
Expand Down
2 changes: 1 addition & 1 deletion Zend/zend_hrtime.c
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ ZEND_API mach_timebase_info_data_t zend_hrtime_timerlib_info = {
.denom = 1,
};

#elif ZEND_HRTIME_PLATFORM_HPUX
#elif ZEND_HRTIME_PLATFORM_SUNOS

# include <sys/time.h>

Expand Down
12 changes: 6 additions & 6 deletions Zend/zend_hrtime.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
#define ZEND_HRTIME_PLATFORM_WINDOWS 0
#define ZEND_HRTIME_PLATFORM_APPLE_MACH_ABSOLUTE 0
#define ZEND_HRTIME_PLATFORM_APPLE_GETTIME_NSEC 0
#define ZEND_HRTIME_PLATFORM_HPUX 0
#define ZEND_HRTIME_PLATFORM_SUNOS 0
#define ZEND_HRTIME_PLATFORM_AIX 0

#if defined(_POSIX_TIMERS) && ((_POSIX_TIMERS > 0) || defined(__OpenBSD__)) && defined(_POSIX_MONOTONIC_CLOCK) && defined(CLOCK_MONOTONIC)
Expand All @@ -50,15 +50,15 @@
#elif defined(__APPLE__)
# undef ZEND_HRTIME_PLATFORM_APPLE_MACH_ABSOLUTE
# define ZEND_HRTIME_PLATFORM_APPLE_MACH_ABSOLUTE 1
#elif (defined(__hpux) || defined(hpux)) || ((defined(__sun__) || defined(__sun) || defined(sun)) && (defined(__SVR4) || defined(__svr4__)))
# undef ZEND_HRTIME_PLATFORM_HPUX
# define ZEND_HRTIME_PLATFORM_HPUX 1
#elif (defined(__sun__) || defined(__sun) || defined(sun)) && (defined(__SVR4) || defined(__svr4__))
# undef ZEND_HRTIME_PLATFORM_SUNOS
# define ZEND_HRTIME_PLATFORM_SUNOS 1
#elif defined(_AIX)
# undef ZEND_HRTIME_PLATFORM_AIX
# define ZEND_HRTIME_PLATFORM_AIX 1
#endif

#define ZEND_HRTIME_AVAILABLE (ZEND_HRTIME_PLATFORM_POSIX || ZEND_HRTIME_PLATFORM_WINDOWS || ZEND_HRTIME_PLATFORM_APPLE_MACH_ABSOLUTE || ZEND_HRTIME_PLATFORM_APPLE_GETTIME_NSEC || ZEND_HRTIME_PLATFORM_HPUX || ZEND_HRTIME_PLATFORM_AIX)
#define ZEND_HRTIME_AVAILABLE (ZEND_HRTIME_PLATFORM_POSIX || ZEND_HRTIME_PLATFORM_WINDOWS || ZEND_HRTIME_PLATFORM_APPLE_MACH_ABSOLUTE || ZEND_HRTIME_PLATFORM_APPLE_GETTIME_NSEC || ZEND_HRTIME_PLATFORM_SUNOS || ZEND_HRTIME_PLATFORM_AIX)

BEGIN_EXTERN_C()

Expand Down Expand Up @@ -98,7 +98,7 @@ static zend_always_inline zend_hrtime_t zend_hrtime(void)
struct timespec ts = { .tv_sec = 0, .tv_nsec = 0 };
clock_gettime(zend_hrtime_posix_clock_id, &ts);
return ((zend_hrtime_t) ts.tv_sec * (zend_hrtime_t)ZEND_NANO_IN_SEC) + ts.tv_nsec;
#elif ZEND_HRTIME_PLATFORM_HPUX
#elif ZEND_HRTIME_PLATFORM_SUNOS
return (zend_hrtime_t) gethrtime();
#elif ZEND_HRTIME_PLATFORM_AIX
timebasestruct_t t;
Expand Down
6 changes: 3 additions & 3 deletions Zend/zend_portability.h
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ char *alloca();
# endif
#endif

#if !ZEND_DEBUG && (defined(HAVE_ALLOCA) || (defined (__GNUC__) && __GNUC__ >= 2)) && !(defined(ZTS) && defined(HPUX)) && !defined(__APPLE__)
#if !ZEND_DEBUG && (defined(HAVE_ALLOCA) || (defined (__GNUC__) && __GNUC__ >= 2)) && !defined(__APPLE__)
# define ZEND_ALLOCA_MAX_SIZE (32 * 1024)
# define ALLOCA_FLAG(name) \
bool name;
Expand Down Expand Up @@ -357,7 +357,7 @@ char *alloca();
# endif
#endif

#if (defined(__GNUC__) && __GNUC__ >= 3 && !defined(__INTEL_COMPILER) && !defined(__APPLE__) && !defined(__hpux) && !defined(_AIX) && !defined(__osf__)) || __has_attribute(noreturn)
#if (defined(__GNUC__) && __GNUC__ >= 3 && !defined(__INTEL_COMPILER) && !defined(__APPLE__) && !defined(_AIX) && !defined(__osf__)) || __has_attribute(noreturn)
# define HAVE_NORETURN
# define ZEND_NORETURN __attribute__((noreturn))
#elif defined(ZEND_WIN32)
Expand All @@ -373,7 +373,7 @@ char *alloca();
# define ZEND_STACK_ALIGNED
#endif

#if (defined(__GNUC__) && __GNUC__ >= 3 && !defined(__INTEL_COMPILER) && !defined(__APPLE__) && !defined(__hpux) && !defined(_AIX) && !defined(__osf__))
#if (defined(__GNUC__) && __GNUC__ >= 3 && !defined(__INTEL_COMPILER) && !defined(__APPLE__) && !defined(_AIX) && !defined(__osf__))
# define HAVE_NORETURN_ALIAS
# define HAVE_ATTRIBUTE_WEAK
#endif
Expand Down
31 changes: 3 additions & 28 deletions build/php.m4
Original file line number Diff line number Diff line change
Expand Up @@ -1079,30 +1079,13 @@ AC_DEFUN([PHP_CHECK_SIZEOF], [
dnl
dnl PHP_TIME_R_TYPE
dnl
dnl Check type of reentrant time-related functions. Type can be: irix, hpux or
dnl POSIX.
dnl Check type of reentrant time-related functions. Type can be: irix or POSIX.
dnl
AC_DEFUN([PHP_TIME_R_TYPE],
[AC_CACHE_CHECK([for type of reentrant time-related functions],
[php_cv_time_r_type],
[AC_RUN_IFELSE([AC_LANG_SOURCE([[
#include <time.h>

int main(void) {
char buf[27];
struct tm t;
time_t old = 0;
int r, s;

s = gmtime_r(&old, &t);
r = (int) asctime_r(&t, buf, 26);
if (r == s && s == 0) return (0);
return (1);
}
]])],
[php_cv_time_r_type=hpux],
[AC_RUN_IFELSE([AC_LANG_SOURCE([[
#include <time.h>
int main(void) {
struct tm t, *s;
time_t old = 0;
Expand All @@ -1116,12 +1099,9 @@ int main(void) {
]])],
[php_cv_time_r_type=irix],
[php_cv_time_r_type=POSIX],
[php_cv_time_r_type=POSIX])],
[php_cv_time_r_type=POSIX])
])
AS_CASE([$php_cv_time_r_type],
[hpux], [AC_DEFINE([PHP_HPUX_TIME_R], [1],
[Define to 1 if you have HP-UX 10.x.-style reentrant time functions.])],
[irix], [AC_DEFINE([PHP_IRIX_TIME_R], [1],
[Define to 1 you have IRIX-style reentrant time functions.])])
])
Expand Down Expand Up @@ -1507,19 +1487,14 @@ dnl ----------------------------------------------------------------------------
dnl
dnl PHP_SHLIB_SUFFIX_NAMES
dnl
dnl Determines link library suffix SHLIB_SUFFIX_NAME which can be: .so, .sl or
dnl Determines link library suffix SHLIB_SUFFIX_NAME which can be: .so, or
dnl .dylib
dnl
dnl Determines shared library suffix SHLIB_DL_SUFFIX_NAME suffix can be: .so or
dnl .sl
dnl Determines shared library suffix SHLIB_DL_SUFFIX_NAME suffix can be: .so.
dnl
AC_DEFUN([PHP_SHLIB_SUFFIX_NAMES], [
AC_REQUIRE([PHP_CANONICAL_HOST_TARGET])dnl
AS_CASE([$host_alias],
[*hpux*], [
SHLIB_SUFFIX_NAME=sl
SHLIB_DL_SUFFIX_NAME=sl
],
[*darwin*], [
SHLIB_SUFFIX_NAME=dylib
SHLIB_DL_SUFFIX_NAME=so
Expand Down
5 changes: 0 additions & 5 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -226,11 +226,6 @@ case $host_alias in
*solaris*)
CPPFLAGS="$CPPFLAGS -D_POSIX_PTHREAD_SEMANTICS"
;;
*hpux*)
if test "$GCC" = "yes"; then
CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
fi
;;
esac

dnl Disable PIC mode by default where it is known to be safe to do so, to avoid
Expand Down
8 changes: 0 additions & 8 deletions ext/fileinfo/php_libmagic.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,6 @@
#define FINFO_READ_FUNC read
#endif

#if defined(__hpux) && !defined(HAVE_STRTOULL)
#if SIZEOF_LONG == 8
# define strtoull strtoul
#else
# define strtoull __strtoull
#endif
#endif

#ifndef offsetof
#define offsetof(STRUCTURE,FIELD) ((int)((char*)&((STRUCTURE*)0)->FIELD))
#endif
Expand Down
6 changes: 0 additions & 6 deletions ext/standard/basic_functions.stub.php
Original file line number Diff line number Diff line change
Expand Up @@ -816,23 +816,17 @@
* @cvalue LOG_LPR
*/
const LOG_LPR = UNKNOWN;
#ifdef LOG_NEWS
/* No LOG_NEWS on HP-UX */
/**
* usenet new
* @var int
* @cvalue LOG_NEWS
*/
const LOG_NEWS = UNKNOWN;
#endif
#ifdef LOG_UUCP
/* No LOG_UUCP on HP-UX */
/**
* @var int
* @cvalue LOG_UUCP
*/
const LOG_UUCP = UNKNOWN;
#endif
#ifdef LOG_CRON
/* apparently some systems don't have this one */
/**
Expand Down
6 changes: 1 addition & 5 deletions ext/standard/basic_functions_arginfo.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions ext/standard/basic_functions_decl.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 0 additions & 7 deletions main/php_reentrancy.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,6 @@
#undef HAVE_CTIME_R
#endif

#if defined(PHP_HPUX_TIME_R)
#undef HAVE_LOCALTIME_R
#undef HAVE_ASCTIME_R
#undef HAVE_CTIME_R
#undef HAVE_GMTIME_R
#endif

BEGIN_EXTERN_C()

#if !defined(HAVE_LOCALTIME_R) && defined(HAVE_LOCALTIME)
Expand Down
37 changes: 0 additions & 37 deletions main/reentrancy.c
Original file line number Diff line number Diff line change
Expand Up @@ -68,43 +68,6 @@ PHPAPI char *php_asctime_r(const struct tm *tm, char *buf)

#endif

#if defined(PHP_HPUX_TIME_R)

#define HAVE_LOCALTIME_R 1
#define HAVE_CTIME_R 1
#define HAVE_ASCTIME_R 1
#define HAVE_GMTIME_R 1

PHPAPI struct tm *php_localtime_r(const time_t *const timep, struct tm *p_tm)
{
if (localtime_r(timep, p_tm) == 0)
return (p_tm);
return (NULL);
}

PHPAPI char *php_ctime_r(const time_t *clock, char *buf)
{
if (ctime_r(clock, buf, 26) != -1)
return (buf);
return (NULL);
}

PHPAPI char *php_asctime_r(const struct tm *tm, char *buf)
{
if (asctime_r(tm, buf, 26) != -1)
return (buf);
return (NULL);
}

PHPAPI struct tm *php_gmtime_r(const time_t *const timep, struct tm *p_tm)
{
if (gmtime_r(timep, p_tm) == 0)
return (p_tm);
return (NULL);
}

#endif

#if !defined(HAVE_LOCALTIME_R) && defined(HAVE_LOCALTIME)

PHPAPI struct tm *php_localtime_r(const time_t *const timep, struct tm *p_tm)
Expand Down
2 changes: 0 additions & 2 deletions sapi/cli/config.m4
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ PHP_ARG_ENABLE([cli],
if test "$PHP_CLI" != "no"; then
AC_CHECK_FUNCS([setproctitle])

AC_CHECK_HEADERS([sys/pstat.h])

AC_CACHE_CHECK([for PS_STRINGS], [php_cv_var_PS_STRINGS],
[AC_LINK_IFELSE([AC_LANG_PROGRAM([
#include <machine/vmparam.h>
Expand Down
17 changes: 0 additions & 17 deletions sapi/cli/ps_title.c
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,6 @@ extern char** environ;
#include <string.h>
#include <stdlib.h>

#ifdef HAVE_SYS_PSTAT_H
#include <sys/pstat.h> /* for HP-UX */
#endif
#ifdef HAVE_PS_STRINGS
#include <machine/vmparam.h> /* for old BSD */
#include <sys/exec.h>
Expand All @@ -68,9 +65,6 @@ extern char** environ;
* PS_USE_SETPROCTITLE
* use the function setproctitle(const char *, ...)
* (newer BSD systems)
* PS_USE_PSTAT
* use the pstat(PSTAT_SETCMD, )
* (HPUX)
* PS_USE_PS_STRINGS
* assign PS_STRINGS->ps_argvstr = "string"
* (some BSD systems)
Expand All @@ -88,8 +82,6 @@ extern char** environ;
*/
#if defined(HAVE_SETPROCTITLE)
#define PS_USE_SETPROCTITLE
#elif defined(HAVE_SYS_PSTAT_H) && defined(PSTAT_SETCMD)
#define PS_USE_PSTAT
#elif defined(HAVE_PS_STRINGS)
#define PS_USE_PS_STRINGS
#elif defined(BSD) && !defined(__APPLE__)
Expand Down Expand Up @@ -360,15 +352,6 @@ ps_title_status set_ps_title(const char *title, size_t title_len)
setproctitle("%s", ps_buffer);
#endif

#ifdef PS_USE_PSTAT
{
union pstun pst;

pst.pst_command = ps_buffer;
pstat(PSTAT_SETCMD, pst, ps_buffer_cur_len, 0, 0);
}
#endif /* PS_USE_PSTAT */

#ifdef PS_USE_PS_STRINGS
PS_STRINGS->ps_nargvstr = 1;
PS_STRINGS->ps_argvstr = ps_buffer;
Expand Down
9 changes: 0 additions & 9 deletions sapi/litespeed/lsapilib.c
Original file line number Diff line number Diff line change
Expand Up @@ -2022,15 +2022,6 @@ ssize_t gsendfile( int fdOut, int fdIn, off_t *off, size_t size )
#define gsendfile sendfile
#endif


#if defined(HPUX)
ssize_t gsendfile( int fdOut, int fdIn, off_t * off, size_t size )
{
return sendfile( fdOut, fdIn, off, size, NULL, 0 );
}
#endif


ssize_t LSAPI_sendfile_r( LSAPI_Request * pReq, int fdIn, off_t* off, size_t size )
{
struct lsapi_packet_header * pHeader = pReq->m_respPktHeader;
Expand Down
Loading