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.
> 
> Regards,
> Randall
> 
> 

-- 
Thomas E. Dickey <[email protected]>
https://invisible-island.net

Attachment: signature.asc
Description: PGP signature

Reply via email to