On Sun, Nov 16, 2025 at 11:52:04AM -0500, [email protected] wrote: > >-----Original Message----- > >From: Thomas Dickey <[email protected]> > >Sent: November 16, 2025 10:39 AM > >To: [email protected] > >Cc: [email protected]; 'Ncurses Mailing List' > <[email protected]> > >Subject: Re: Contributions for HPE NonStop/Tandem > > > >On Sun, Nov 16, 2025 at 10:25:57AM -0500, [email protected] wrote: > >> Hi Thomas, > >> > >> I wonder what the best way would be to contribute changes to support > >> the HPE NonStop platform (formerly Tandem). > >> > >> The changes are all in the configure file relating to the intptr_t > >> definition. Prior to building ncurses, I run the following: > >> > >> sed "/#define intptr_t long/!{p;d};a #if defined (__TANDEM)" -i > >> configure sed "/#define intptr_t long/!{p;d};n;a # if ! defined > >> (__cplusplus)" -i configure sed "/#define intptr_t long/!{p;d};n;n;a # > >> define intptr_t long" -i configure sed "/#define intptr_t > >> long/!{p;d};n;n;n;a # endif" -i configure sed "/#define intptr_t > >> long/!{p;d};n;n;n;n;a #else" -i configure sed "/#define intptr_t > >> long/!{p;d};n;n;n;n;n;a # define intptr_t long" -i configure sed > >> "/#define intptr_t long/!{p;d};n;n;n;n;n;n;a #endif" -i configure sed > >> "/#define intptr_t long/d" -i configure > > > >That's changing this chunk > > > > cat >>confdefs.h <<EOF > > #define intptr_t long > > EOF > > > >to something like > > > > cat >>confdefs.h <<EOF > > #if defined (__TANDEM) > > # if ! defined (__cplusplus) > > # define intptr_t long > > # endif > > #else > > # define intptr_t long > > #endif > > EOF > > > >But that would be used if there's something unexpected in the > compile-check: > > > > #line 22993 "configure" > > #include "confdefs.h" > > $ac_includes_default > > int > > main (void) > > { > > if ((intptr_t *) 0) > > return 0; > > if (sizeof (intptr_t)) > > return 0; > > ; > > return 0; > > } > > _ACEOF > > rm -f "conftest.$ac_objext" > > if { (eval echo "$as_me:23008: \"$ac_compile\"") >&5 > > > >or if the way it's used in the code doesn't have the #include's that were > needed in > >$ac_includes_default > > > > ac_includes_default="\ > > #include <stdio.h> > > #if HAVE_SYS_TYPES_H > > # include <sys/types.h> > > #endif > > #if HAVE_SYS_STAT_H > > # include <sys/stat.h> > > #endif > > #if STDC_HEADERS > > # include <stdlib.h> > > # include <stddef.h> > > #else > > # if HAVE_STDLIB_H > > # include <stdlib.h> > > # endif > > #endif > > #if HAVE_STRING_H > > # if !STDC_HEADERS && HAVE_MEMORY_H > > # include <memory.h> > > # endif > > # include <string.h> > > #endif > > #if HAVE_STRINGS_H > > # include <strings.h> > > #endif > > #if HAVE_INTTYPES_H > > # include <inttypes.h> > > #else > > # if HAVE_STDINT_H > > # include <stdint.h> > > # endif > > #endif > > #if HAVE_UNISTD_H > > # include <unistd.h> > > #endif" > > > >So... what did I miss in the configure script (or C code)? > > > >> This has been required for a long time. > > The issue is that intptr_t is different when building in c++ vs. standard C > on NonStop. There isn't anything I can do about that. It is the missed C++ > wrapper that counts here. > > What the code looks like, for NonStop is: > > cat >>confdefs.h <<EOF > #if defined (__TANDEM) > # if ! defined (__cplusplus) > # define intptr_t long > # endif > #else > # define intptr_t long > #endif > EOF > > That inhibits intptr_t, which is already defined in C++ headers on the > platform but not by the c99 compiler when not in C++.
oh... then you're compiling ncurses with C++ ?
I don't see where I might have used intptr_t in any of the public interface:
INSTALL:1328: better choice would be intptr_t, which was not available at the
time
INSTALL:1676: --with-tparm-arg=intptr_t
NEWS:5843: + build-fix for OpenBSD 4.9 to supply consistent intptr_t
declaration
aclocal.m4:109: cf_dft_tparm_arg=intptr_t
configure:1769: cf_dft_tparm_arg=intptr_t
configure:22987:echo "$as_me:22987: checking for intptr_t" >&5
configure:22988:echo $ECHO_N "checking for intptr_t... $ECHO_C" >&6
configure:22999:if ((intptr_t *) 0)
configure:23001:if (sizeof (intptr_t))
configure:23034:#define intptr_t long
configure.in:1871:AC_CHECK_TYPE(intptr_t, long)
ncurses/curses.priv.h:142:# define CASTxPTR(n) (unsigned
long)(intptr_t)(void*)(n)
ncurses/curses.priv.h:144:# define CASTxPTR(n) (intptr_t)(n)
ncurses/tinfo/lib_win32con.c:155: intptr_t value = _get_osfhandle(fd);
package/mingw-ncurses.spec:77: --with-tparm-arg=intptr_t \\\
progs/toe.c:298: if ((intptr_t) value == (intptr_t) (-1)) {
test/test.priv.h:492:#define my_intptr_t intptr_t
--
Thomas E. Dickey <[email protected]>
https://invisible-island.net
signature.asc
Description: PGP signature
