bug-ncurses
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Simple patch for allowing NCurses to build on HPE NonStop


From: Thomas Dickey
Subject: Re: Simple patch for allowing NCurses to build on HPE NonStop
Date: Mon, 17 Aug 2020 20:18:26 -0400
User-agent: NeoMutt/20170113 (1.7.2)

On Mon, Aug 17, 2020 at 07:24:50PM -0400, Thomas Dickey wrote:
> On Mon, Aug 17, 2020 at 06:50:17PM -0400, Randall S. Becker wrote:
> > I have a straightforward patch that would allow Ncurses to build on HPE
> > NonStop platforms. This is fairly trivial. The first patch recognizes the
> > platform, while the second is required because of where secondary string
> > method definitions are located. The patch is based on ncurses 6.2 - patch
> > 20200613 (commit 7503e8d8).
> 
> thanks (on to-do list)
...
> > diff --git a/test/picsmap.c b/test/picsmap.c
> > index 432fbf7a..fc0b90db 100644
> > --- a/test/picsmap.c
> > +++ b/test/picsmap.c
> > @@ -83,6 +83,10 @@
> > #define RGB_PATH "/etc/X11/rgb.txt"
> > #endif
> >  
> > +#ifdef __TANDEM
> 
> Actually - something like this:
> 
> #if HAVE_STRINGS_H
> 
> > +#include <strings.h>
> > +#endif
> > +
> > #include <picsmap.h>

which raises the question of what's in strings.h

According to

https://support.hpe.com/hpesc/public/docDisplay?docId=emr_na-c02128447

HPE
C/C++ Programmer's Guide for NonStopSystems

it says it's compliant:

        Writing programs to international standards enables you to move them
        between different hardware andsoftware environments with little effort. 
        Write your C programs to comply with the ISO/ANSI C standard:ISO/IEC
        9899:1990, Programming Languages–C plus features from 1999 update to
        this standard (see c99 Selected Features (C99LITE) on page 598 for
        TNS/E programs on H06.21 and later H-series RVUsor for J06.10 and later
        J-series RVUs, see c99 Full Support on page 602 for TNS/E and TNS/X
        native applications for H06.21 and later H-series RVUs, J06.10 and later
        J-series RVUs, and L-series RVUs,and see c11 Support for TNS/X
        Compilers conform to the 2011 ANSI C Standard starting from L16.0548
        Writing Portable Programs RVU.  c11 supports compilation of C and C++
        programs).  For a complete description of ANSI C, see ANSI X3.159

however, I'm reminded that strings.h is only standardized to include
the legacy BSD stuff - described here:

https://pubs.opengroup.org/onlinepubs/009695399/basedefs/strings.h.html

while picsmap is using several functions from the modern version string.h:

https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/string.h.html

strchr
strcmp
strcpy
strlen
strncmp
strstr

(strstr vs index used to be something I took into account in ports)

-- 
Thomas E. Dickey <dickey@invisible-island.net>
https://invisible-island.net
ftp://ftp.invisible-island.net

Attachment: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]