From rra at isc.org Sun Dec 2 14:05:50 2018 From: rra at isc.org (INN Commit) Date: Sun, 2 Dec 2018 06:05:50 -0800 (PST) Subject: INN commit: branches/2.6 (8 files) Message-ID: <20181202140550.C3F7567D42@hope.eyrie.org> Date: Sunday, December 2, 2018 @ 06:05:50 Author: iulius Revision: 10304 Rewrite GetFQDN and rename to inn_getfqdn Use getaddrinfo with AI_CANONNAME instead of the tedious code to find an FQDN in gethostbyname results. Return a newly-allocated string instead of using a static buffer, since this function isn't performance-critical, avoiding buffer management complexity. Adjust call sites to do proper memory allocation handling of the return value. Remove some old disabled code to try to force canonicalization by adding a period to the end of the DNS query. Patch from Russ Allbery (backported from CURRENT). Modified: branches/2.6/doc/man/libinn.3 branches/2.6/doc/pod/inn.conf.pod branches/2.6/frontends/inews.c branches/2.6/include/inn/libinn.h branches/2.6/lib/getfqdn.c branches/2.6/lib/innconf.c branches/2.6/lib/messageid.c branches/2.6/nnrpd/post.c ----------------------+ doc/man/libinn.3 | 12 +++-- doc/pod/inn.conf.pod | 4 - frontends/inews.c | 6 +- include/inn/libinn.h | 11 +++- lib/getfqdn.c | 110 +++++++++++++++---------------------------------- lib/innconf.c | 9 ++-- lib/messageid.c | 8 ++- nnrpd/post.c | 11 +++- 8 files changed, 75 insertions(+), 96 deletions(-) Modified: doc/man/libinn.3 =================================================================== --- doc/man/libinn.3 2018-11-11 14:43:41 UTC (rev 10303) +++ doc/man/libinn.3 2018-12-02 14:05:50 UTC (rev 10304) @@ -61,8 +61,8 @@ .B " bool block;" .B "char *" -.B "GetFQDN(domain)" -.B " char *domain;" +.B "inn_getfqdn(domain)" +.B " const char *domain;" .B "char *" .B "GetModeratorAddress(FromServer, ToServer, group, moderatormailer)" @@ -276,11 +276,13 @@ is one of: INN_LOCK_READ, INN_LOCK_WRITE, or INN_LOCK_UNLOCK. It returns false on failure or true on success. .PP -.I GetFQDN +.I inn_getfqdn returns the fully qualified domain name of the local host. .I Domain -is used if local host can not be resolved. -The returned value points to static space that is reused on subsequent calls, +is used to qualify the local host name if local host can not be resolved +in DNS. +The returned value points to newly-allocated memory that the caller is +responsible for freeing, or NULL on error. .PP .I GetModeratorAddress Modified: doc/pod/inn.conf.pod =================================================================== --- doc/pod/inn.conf.pod 2018-11-11 14:43:41 UTC (rev 10303) +++ doc/pod/inn.conf.pod 2018-12-02 14:05:50 UTC (rev 10304) @@ -60,8 +60,8 @@ This should be the domain name of the local host. It should not have a leading period, and it should not be a full host address. It is used only -if the GetFQDN() routine in libinn(3) cannot get the fully qualified -domain name by using either the gethostname(3) or gethostbyname(3) calls. +if the inn_getfqdn() routine in libinn(3) cannot get the fully qualified +domain name by using either the gethostname(3) or getaddrinfo(3) calls. The check is very simple; if either routine returns a name with a period in it, then it is assumed to have the full domain name. As this parameter is rarely used, do not use it to affect the righthand side of Modified: frontends/inews.c =================================================================== --- frontends/inews.c 2018-11-11 14:43:41 UTC (rev 10303) +++ frontends/inews.c 2018-12-02 14:05:50 UTC (rev 10304) @@ -608,9 +608,11 @@ HDR(_path) = concat(Exclusions, PATHFLUFF, (char *) 0); } else if (innconf->server != NULL) { - if ((p = GetFQDN(innconf->domain)) == NULL) - sysdie("cannot get hostname"); + p = inn_getfqdn(innconf->domain); + if (p == NULL) + sysdie("cannot get hostname"); HDR(_path) = concat(Exclusions, p, "!", PATHFLUFF, (char *) 0); + free(p); } else { HDR(_path) = concat(Exclusions, PATHFLUFF, (char *) 0); Modified: include/inn/libinn.h =================================================================== --- include/inn/libinn.h 2018-11-11 14:43:41 UTC (rev 10303) +++ include/inn/libinn.h 2018-12-02 14:05:50 UTC (rev 10304) @@ -137,10 +137,15 @@ const char *request); extern void CAclose(void); -extern char * GetFQDN(char *domain); -extern char * GetModeratorAddress(FILE *FromServer, FILE *ToServer, - char *group, char *moderatormailer); +/* Return the fully-qualified domain name of the local system in + newly-allocated memory, or NULL if it cannot be discovered. The caller is + responsible for freeing. If the host's domain cannot be found in DNS, use + the domain argument as a fallback. */ +extern char * inn_getfqdn(const char *domain); +extern char * GetModeratorAddress(FILE *FromServer, FILE *ToServer, + char *group, char *moderatormailer); + #define TEMPORARYOPEN 0 #define INND_HISTORY 1 #define INND_HISLOG 2 Modified: lib/getfqdn.c =================================================================== --- lib/getfqdn.c 2018-11-11 14:43:41 UTC (rev 10303) +++ lib/getfqdn.c 2018-12-02 14:05:50 UTC (rev 10304) @@ -1,96 +1,54 @@ /* $Id$ ** +** Discover the fully-qualified domain name of the local host. */ #include "config.h" #include "clibrary.h" -#include +#include "portable/socket.h" #include "inn/libinn.h" -#include "inn/paths.h" +#include "inn/xmalloc.h" /* -** Get the fully qualified domain name for this host, as reported -** by the system. +** Return the fully-qualified domain name of the local system in +** newly-allocated memory, or NULL if it cannot be discovered. The caller is +** responsible for freeing. If the host's domain cannot be found in DNS, use +** the domain argument as a fallback. */ -char *GetFQDN(char *domain) +char * +inn_getfqdn(const char *domain) { - static char buff[SMBUF]; - struct hostent *hp; - char *p; - char **ap; -#if 0 - /* See comments below. */ - char temp[SMBUF + 2]; -#endif /* 0 */ + char hostname[BUFSIZ]; + struct addrinfo hints, *res; + char *fqdn, *canon; - /* Return any old results. */ - if (buff[0]) - return buff; + /* If gethostname fails, there's nothing we can do. */ + if (gethostname(hostname, sizeof(hostname)) < 0) + return NULL; - /* Try gethostname. */ - if (gethostname(buff, (int)sizeof buff) < 0) - return NULL; - if (strchr(buff, '.') != NULL) - return buff; + /* If the local hostname is already fully qualified, just return it. */ + if (strchr(hostname, '.') != NULL) + return xstrdup(hostname); - /* - ** See if DNS (or /etc/hosts) gives us a full domain name. If the host - ** doesn't exist in DNS at all but we were given a domain name, use the - ** fallback of appending that domain to the hostname. - */ - if ((hp = gethostbyname(buff)) == NULL) - goto fallback; -#if 0 - /* This code is a "feature" that allows multiple domains (NIS or - * DNS, I'm not sure) to work with a single INN server. However, - * it turns out to cause more problems for people, and they have to - * use hacks like __switch_gethostbyname, etc. So if you need this, - * turn it on, but don't complain to me. */ - if (strchr(hp->h_name, '.') == NULL) { - /* Try to force DNS lookup if NIS/whatever gets in the way. */ - strlcpy(temp, buff, sizeof(temp)); - strlcat(temp, ".", sizeof(temp)); - hp = gethostbyname(temp); - } - if (hp == NULL) { - return NULL; - } -#endif /* 0 */ - - /* First, see if the main name is a FQDN. It should be. */ - if (strchr(hp->h_name, '.') != NULL) { - if (strlen(hp->h_name) < sizeof buff - 1) { - strlcpy(buff, hp->h_name, sizeof(buff)); - return buff; + /* Attempt to canonicalize with DNS. */ + memset(&hints, 0, sizeof(hints)); + hints.ai_family = AF_UNSPEC; + hints.ai_flags = AI_CANONNAME; + if (getaddrinfo(hostname, NULL, &hints, &res) == 0) { + canon = res->ai_canonname; + if (canon != NULL && strchr(canon, '.') != NULL) { + fqdn = xstrdup(canon); + freeaddrinfo(res); + return fqdn; } - /* Doesn't fit; make sure we don't return bad data next time. */ - buff[0] = '\0'; - return hp->h_name; + freeaddrinfo(res); } - /* Second, see if any aliases are. */ - if ((ap = hp->h_aliases) != NULL) - while ((p = *ap++) != NULL) - if (strchr(p, '.') != NULL) { - /* Deja-vous all over again. */ - if (strlen(p) < sizeof buff - 1) { - strlcpy(buff, p, sizeof(buff)); - return buff; - } - buff[0] = '\0'; - return p ; - } - - /* Give up: Get the domain config param and append it. */ -fallback: - if ((p = domain) == NULL || *p == '\0') - return NULL; - if (strlen(buff) + 1 + strlen(p) > sizeof buff - 1) - /* Doesn't fit. */ - return NULL; - strlcat(buff, ".", sizeof(buff)); - strlcat(buff, p, sizeof(buff)); - return buff; + /* Fall back on canonicalizing with a provided domain. */ + if (domain == NULL || domain[0] == '\0') + return NULL; + xasprintf(&fqdn, "%s.%s", hostname, domain); + return fqdn; } Modified: lib/innconf.c =================================================================== --- lib/innconf.c 2018-11-11 14:43:41 UTC (rev 10303) +++ lib/innconf.c 2018-12-02 14:05:50 UTC (rev 10304) @@ -332,9 +332,9 @@ /* Some parameters have defaults that depend on other parameters. */ if (innconf->fromhost == NULL) - innconf->fromhost = xstrdup(GetFQDN(innconf->domain)); + innconf->fromhost = inn_getfqdn(innconf->domain); if (innconf->pathhost == NULL) - innconf->pathhost = xstrdup(GetFQDN(innconf->domain)); + innconf->pathhost = inn_getfqdn(innconf->domain); if (innconf->pathtmp == NULL) innconf->pathtmp = xstrdup(INN_PATH_TMP); @@ -472,11 +472,14 @@ innconf_validate(struct config_group *group) { bool okay = true; + char *fqdn; - if (GetFQDN(innconf->domain) == NULL) { + fqdn = inn_getfqdn(innconf->domain); + if (fqdn == NULL) { warn("hostname does not resolve or domain not set in inn.conf"); okay = false; } + free(fqdn); if (innconf->mta == NULL) { warn("must set mta in inn.conf"); okay = false; Modified: lib/messageid.c =================================================================== --- lib/messageid.c 2018-11-11 14:43:41 UTC (rev 10303) +++ lib/messageid.c 2018-12-02 14:05:50 UTC (rev 10304) @@ -30,6 +30,7 @@ static char buff[SMBUF]; static int count; char *p; + char *fqdn = NULL; char sec32[10]; char pid32[10]; time_t now; @@ -42,10 +43,13 @@ && strcmp(domain, innconf->domain) != 0)) { p = domain; } else { - if ((p = GetFQDN(domain)) == NULL) - return NULL; + fqdn = inn_getfqdn(domain); + if (fqdn == NULL) + return NULL; + p = fqdn; } snprintf(buff, sizeof(buff), "<%s$%s$%d@%s>", sec32, pid32, ++count, p); + free(fqdn); return buff; } Modified: nnrpd/post.c =================================================================== --- nnrpd/post.c 2018-11-11 14:43:41 UTC (rev 10303) +++ nnrpd/post.c 2018-12-02 14:05:50 UTC (rev 10304) @@ -348,6 +348,7 @@ static char *newpath = NULL; HEADER *hp; char *p; + char *fqdn = NULL; time_t t, now; const char *error; pid_t pid; @@ -561,11 +562,15 @@ if (VirtualPathlen > 0) { p = PERMaccessconf->domain; } else { - if ((p = GetFQDN(PERMaccessconf->domain)) == NULL) { - p = (char *) "unknown"; - } + fqdn = inn_getfqdn(PERMaccessconf->domain); + if (fqdn == NULL) + p = (char *) "unknown"; + else + p = fqdn; } snprintf(pathidentitybuff, sizeof(pathidentitybuff), "%s", p); + free(fqdn); + p = NULL; /* Set the posting-account value. */ if (PERMaccessconf->addinjectionpostingaccount && PERMuser[0] != '\0') { From rra at isc.org Sun Dec 2 14:21:57 2018 From: rra at isc.org (INN Commit) Date: Sun, 2 Dec 2018 06:21:57 -0800 (PST) Subject: INN commit: branches/2.6 (29 files) Message-ID: <20181202142157.4F8A567D42@hope.eyrie.org> Date: Sunday, December 2, 2018 @ 06:21:56 Author: iulius Revision: 10305 Take into account new GCC 7.0 and 8.0 warnings Merge commits 10193 and 10291 from CURRENT. Modified: branches/2.6/backends/inndf.c branches/2.6/backends/innxbatch.c branches/2.6/backends/innxmit.c branches/2.6/backends/nntpget.c branches/2.6/backends/shlock.c branches/2.6/contrib/newsresp.c branches/2.6/history/his.c branches/2.6/history/hisv6/hisv6.c branches/2.6/include/inn/dbz.h branches/2.6/innd/chan.c branches/2.6/innd/nc.c branches/2.6/innd/perl.c branches/2.6/innd/python.c branches/2.6/innd/site.c branches/2.6/innd/status.c branches/2.6/innfeed/configfile.l branches/2.6/innfeed/host.c branches/2.6/innfeed/imap_connection.c branches/2.6/innfeed/misc.c branches/2.6/nnrpd/misc.c branches/2.6/nnrpd/perl.c branches/2.6/nnrpd/post.c branches/2.6/nnrpd/python.c branches/2.6/samples/innwatch.ctl branches/2.6/storage/buffindexed/buffindexed.c branches/2.6/storage/buffindexed/shmem.c branches/2.6/storage/cnfs/cnfs.c branches/2.6/storage/ovdb/ovdb.c branches/2.6/tests/lib/date-t.c -----------------------------------+ backends/inndf.c | 2 +- backends/innxbatch.c | 3 +++ backends/innxmit.c | 2 +- backends/nntpget.c | 2 +- backends/shlock.c | 2 +- contrib/newsresp.c | 10 +++++----- history/his.c | 6 +++--- history/hisv6/hisv6.c | 4 ++-- include/inn/dbz.h | 5 +++++ innd/chan.c | 9 +++++---- innd/nc.c | 6 +++--- innd/perl.c | 10 +++++----- innd/python.c | 9 +++++---- innd/site.c | 2 +- innd/status.c | 25 +++++++++++++------------ innfeed/configfile.l | 4 +++- innfeed/host.c | 25 +++++++++++++------------ innfeed/imap_connection.c | 10 +++++++++- innfeed/misc.c | 2 +- nnrpd/misc.c | 2 +- nnrpd/perl.c | 4 ++-- nnrpd/post.c | 6 +++--- nnrpd/python.c | 14 +++++++------- samples/innwatch.ctl | 8 ++++---- storage/buffindexed/buffindexed.c | 31 ++++++++++++++++++------------- storage/buffindexed/shmem.c | 23 +++++++++++++---------- storage/cnfs/cnfs.c | 2 +- storage/ovdb/ovdb.c | 2 +- tests/lib/date-t.c | 18 ++++++++++-------- 29 files changed, 140 insertions(+), 108 deletions(-) Modified: backends/inndf.c =================================================================== --- backends/inndf.c 2018-12-02 14:05:50 UTC (rev 10304) +++ backends/inndf.c 2018-12-02 14:21:56 UTC (rev 10305) @@ -332,7 +332,7 @@ printf("Space used is meaningless for the %s method\n", innconf->ovmethod); else - printf("%.2f%% overview space used\n", used); + printf("%.2f%% overview space used\n", (double) used); } if (overview != NULL) overview_close(overview); Modified: backends/innxbatch.c =================================================================== --- backends/innxbatch.c 2018-12-02 14:05:50 UTC (rev 10304) +++ backends/innxbatch.c 2018-12-02 14:21:56 UTC (rev 10305) @@ -60,6 +60,9 @@ */ static bool Debug = false; static bool STATprint; +#ifdef FROMSTDIN +static bool FromStdin = false; +#endif static char *REMhost; static double STATbegin; static double STATend; Modified: backends/innxmit.c =================================================================== --- backends/innxmit.c 2018-12-02 14:05:50 UTC (rev 10304) +++ backends/innxmit.c 2018-12-02 14:21:56 UTC (rev 10305) @@ -602,7 +602,7 @@ return false; if (HeadersFeed) { struct iovec vec[3]; - char buf[20]; + char buf[32]; int iscmsg = 0; int len = HeadersLen(art, &iscmsg); Modified: backends/nntpget.c =================================================================== --- backends/nntpget.c 2018-12-02 14:05:50 UTC (rev 10304) +++ backends/nntpget.c 2018-12-02 14:21:56 UTC (rev 10305) @@ -197,7 +197,7 @@ main(int ac, char *av[]) { char buff[NNTP_MAXLEN_COMMAND]; - char mesgid[NNTP_MAXLEN_COMMAND]; + char mesgid[NNTP_MAXLEN_MSGID+10]; char tbuff[SMBUF]; char *msgidfile = NULL; int msgidfd; Modified: backends/shlock.c =================================================================== --- backends/shlock.c 2018-12-02 14:05:50 UTC (rev 10304) +++ backends/shlock.c 2018-12-02 14:21:56 UTC (rev 10305) @@ -131,7 +131,7 @@ char *p; int fd; char tmp[BUFSIZ]; - char tmp2[BUFSIZ]; + char tmp2[BUFSIZ+1]; char buff[BUFSIZ]; char *name; pid_t pid; Modified: contrib/newsresp.c =================================================================== --- contrib/newsresp.c 2018-12-02 14:05:50 UTC (rev 10304) +++ contrib/newsresp.c 2018-12-02 14:21:56 UTC (rev 10305) @@ -190,19 +190,19 @@ diff = elapsed; elapsed = do_time(start); diff = elapsed - diff; - printf("%5.1f %5.1f ",((float)elapsed)/1000.0,((float)diff)/1000.0); + printf("%5.1f %5.1f ", ((double)elapsed)/1000.0, ((double)diff)/1000.0); } void -massagebuff(int bread, char *buf) +massagebuff(int bread, char *buffer) { char *p; if ( bread > 55 ) - strcpy(buf+55," [...]\n"); + strcpy(buffer+55," [...]\n"); else - buf[bread] = '\0'; - for ( p = buf; *p != '\0'; ) + buffer[bread] = '\0'; + for ( p = buffer; *p != '\0'; ) if ( *p != '\r' ) /* We like to do it RISC style. */ p++; else { Modified: history/his.c =================================================================== --- history/his.c 2018-12-02 14:05:50 UTC (rev 10304) +++ history/his.c 2018-12-02 14:21:56 UTC (rev 10305) @@ -453,9 +453,9 @@ if (HISstat_start[code].tv_sec != 0) { fprintf(HISfdlog, "%d/%d/%d %02d:%02d:%02d.%06d: [%d] %s (%.6f)\n", tm->tm_year + 1900, tm->tm_mon + 1, tm->tm_mday, tm->tm_hour, - tm->tm_min, tm->tm_sec, (int)tv.tv_usec, code, s, (float) tv.tv_sec + - (float) tv.tv_usec / 1000000 - (float) HISstat_start[code].tv_sec - - (float) HISstat_start[code].tv_usec / 1000000); + tm->tm_min, tm->tm_sec, (int)tv.tv_usec, code, s, (double) tv.tv_sec + + (double) tv.tv_usec / 1000000 - (double) HISstat_start[code].tv_sec - + (double) HISstat_start[code].tv_usec / 1000000); if (tv.tv_usec < HISstat_start[code].tv_usec) { HISstat_total[code].tv_sec++; HISstat_total[code].tv_usec += Modified: history/hisv6/hisv6.c =================================================================== --- history/hisv6/hisv6.c 2018-12-02 14:05:50 UTC (rev 10304) +++ history/hisv6/hisv6.c 2018-12-02 14:21:56 UTC (rev 10305) @@ -79,9 +79,9 @@ { if (offset != -1) { /* really we want an autoconf test for %ll/%L/%I64, sigh */ - sprintf(s, "@%.0f", (double)offset); + snprintf(s, HISV6_MAX_LOCATION, "@%lu", (unsigned long)offset); } else { - sprintf(s, ":%lu", (unsigned long)line); + snprintf(s, HISV6_MAX_LOCATION, ":%lu", (unsigned long)line); } } Modified: include/inn/dbz.h =================================================================== --- include/inn/dbz.h 2018-12-02 14:05:50 UTC (rev 10304) +++ include/inn/dbz.h 2018-12-02 14:21:56 UTC (rev 10305) @@ -69,6 +69,11 @@ extern void dbzsetoptions(const dbzoptions options); extern void dbzgetoptions(dbzoptions *options); +#ifdef DBZTEST +extern int timediffms(struct timeval start, struct timeval end); +extern void RemoveDBZ(char *filename); +#endif /* DBZTEST */ + END_DECLS #endif /* INN_DBZ_H */ Modified: innd/chan.c =================================================================== --- innd/chan.c 2018-12-02 14:05:50 UTC (rev 10304) +++ innd/chan.c 2018-12-02 14:21:56 UTC (rev 10305) @@ -296,14 +296,15 @@ cp->Refused - cp->Refused_checkpoint, cp->Rejected - cp->Rejected_checkpoint, cp->Duplicate - cp->Duplicate_checkpoint, - cp->Size - cp->Size_checkpoint, - cp->DuplicateSize - cp->DuplicateSize_checkpoint, - cp->RejectSize - cp->RejectSize_checkpoint); + (double) (cp->Size - cp->Size_checkpoint), + (double) (cp->DuplicateSize - cp->DuplicateSize_checkpoint), + (double) (cp->RejectSize - cp->RejectSize_checkpoint)); notice("%s closed seconds %ld accepted %ld refused %ld rejected %ld" " duplicate %ld accepted size %.0f duplicate size %.0f" " rejected size %.0f", name, (long)(Now.tv_sec - cp->Started), cp->Received, cp->Refused, cp->Rejected, cp->Duplicate, - cp->Size, cp->DuplicateSize, cp->RejectSize); + (double) cp->Size, (double) cp->DuplicateSize, + (double) cp->RejectSize); } if (cp->Data.Newsgroups.Data != NULL) { free(cp->Data.Newsgroups.Data); Modified: innd/nc.c =================================================================== --- innd/nc.c 2018-12-02 14:05:50 UTC (rev 10304) +++ innd/nc.c 2018-12-02 14:21:56 UTC (rev 10305) @@ -289,9 +289,9 @@ cp->Refused - cp->Refused_checkpoint, cp->Rejected - cp->Rejected_checkpoint, cp->Duplicate - cp->Duplicate_checkpoint, - cp->Size - cp->Size_checkpoint, - cp->DuplicateSize - cp->DuplicateSize_checkpoint, - cp->RejectSize - cp->RejectSize_checkpoint); + (double) (cp->Size - cp->Size_checkpoint), + (double) (cp->DuplicateSize - cp->DuplicateSize_checkpoint), + (double) (cp->RejectSize - cp->RejectSize_checkpoint)); cp->Reported = 0; cp->Started_checkpoint = Now.tv_sec; cp->Received_checkpoint = cp->Received; Modified: innd/perl.c =================================================================== --- innd/perl.c 2018-12-02 14:05:50 UTC (rev 10304) +++ innd/perl.c 2018-12-02 14:21:56 UTC (rev 10305) @@ -206,7 +206,7 @@ ** mode and the reason. */ void -PLmode(OPERATINGMODE Mode, OPERATINGMODE NewMode, char *reason) +PLmode(OPERATINGMODE CurrentMode, OPERATINGMODE NewMode, char *reason) { dSP; HV *mode; @@ -221,13 +221,13 @@ the reason in $mode{reason}. */ mode = perl_get_hv("mode", 1); - if (Mode == OMrunning) + if (CurrentMode == OMrunning) (void) hv_store(mode, "Mode", 4, newSVpv("running", 7), 0); - if (Mode == OMpaused) + if (CurrentMode == OMpaused) (void) hv_store(mode, "Mode", 4, newSVpv("paused", 6), 0); - if (Mode == OMthrottled) + if (CurrentMode == OMthrottled) (void) hv_store(mode, "Mode", 4, newSVpv("throttled", 9), 0); - if (Mode == OMshutdown) + if (CurrentMode == OMshutdown) (void) hv_store(mode, "Mode", 4, newSVpv("shutdown", 8), 0); if (NewMode == OMrunning) Modified: innd/python.c =================================================================== --- innd/python.c 2018-12-02 14:05:50 UTC (rev 10304) +++ innd/python.c 2018-12-02 14:21:56 UTC (rev 10305) @@ -210,7 +210,7 @@ ** Tell the external module about innd's state. */ void -PYmode(OPERATINGMODE Mode, OPERATINGMODE NewMode, char *reason) +PYmode(OPERATINGMODE CurrentMode, OPERATINGMODE NewMode, char *reason) { PyObject *result; char oldmode[10], newmode[10]; @@ -218,7 +218,7 @@ if (!PythonFilterActive || PYFilterObject == NULL || mode_method == NULL) return; - switch (Mode) { + switch (CurrentMode) { default: strlcpy(oldmode, "unknown", 10); break; case OMrunning: strlcpy(oldmode, "running", 10); break; case OMpaused: strlcpy(oldmode, "paused", 10); break; @@ -316,7 +316,7 @@ char *msgid; Py_ssize_t msgidlen; char *articlepaths = (char *) ""; - char tbuff[12]; + char tbuff[32]; char *parambuf[6]; if (!PyArg_ParseTuple(args, (char *) "s#", &msgid, &msgidlen)) @@ -526,7 +526,8 @@ /* Compress out multiple whitespace in the trimmed string. We * do a copy because this is probably an original art * buffer. */ - workstring = memcpy(xmalloc(worksize), wpos, worksize); + workstring = xmalloc(worksize + 1); + memcpy(workstring, wpos, worksize); wasspace = false; p = wpos; q = workstring; Modified: innd/site.c =================================================================== --- innd/site.c 2018-12-02 14:05:50 UTC (rev 10304) +++ innd/site.c 2018-12-02 14:21:56 UTC (rev 10305) @@ -334,7 +334,7 @@ HDRCONTENT *hc = Data->HdrContent; static char ITEMSEP[] = " "; static char NL[] = "\n"; - char pbuff[12]; + char pbuff[32]; char *p; bool Dirty; struct buffer *bp; Modified: innd/status.c =================================================================== --- innd/status.c 2018-12-02 14:05:50 UTC (rev 10304) +++ innd/status.c 2018-12-02 14:21:56 UTC (rev 10305) @@ -85,12 +85,12 @@ PrettySize(float size, char *str) { if (size > 1073741824) /* 1024*1024*1024 */ - sprintf (str, "%.1fGb", size / 1073741824.); + sprintf (str, "%.1fGb", (double) size / 1073741824.); else if (size > 1048576) /* 1024*1024 */ - sprintf (str, "%.1fMb", size / 1048576.); + sprintf (str, "%.1fMb", (double) size / 1048576.); else - sprintf (str, "%.1fkb", size / 1024.); + sprintf (str, "%.1fkb", (double) size / 1024.); return (str); } @@ -117,7 +117,7 @@ char other_ip_addr[INET6_ADDRSTRLEN]; char *p; STATUS *head, *status, *tmp; - char str[9]; + char str[315]; /* Maximum buffer size for PrettySize() */ time_t now; if (innconf->htmlstatus) { @@ -296,18 +296,18 @@ if (!offered) offered = 1; /* to avoid division by zero */ if (!size) size = 1; /* avoid divide by zero here too */ fprintf (F, " accepted: %-9lu %%accepted: %.1f%%\n", - accepted, (float) accepted / offered * 100); + accepted, (double) accepted / offered * 100); fprintf (F, " refused: %-9lu %%refused: %.1f%%\n", - refused, (float) refused / offered * 100); + refused, (double) refused / offered * 100); fprintf (F, " rejected: %-9lu %%rejected: %.1f%%\n", - rejected, (float) rejected / offered * 100); + rejected, (double) rejected / offered * 100); fprintf (F, " duplicated: %-9lu %%duplicated: %.1f%%\n", - duplicate, (float) duplicate / offered * 100); + duplicate, (double) duplicate / offered * 100); fprintf (F, " bytes: %-7s\n", PrettySize (size + DuplicateSize + RejectSize, str)); fprintf (F, " duplicated size: %-7s %%duplicated size: %.1f%%\n", - PrettySize(DuplicateSize, str), (float) DuplicateSize / size * 100); + PrettySize(DuplicateSize, str), (double) (DuplicateSize / size * 100)); fprintf (F, " rejected size: %-7s %%rejected size: %.1f%%\n", - PrettySize(RejectSize, str), (float) RejectSize / size * 100); + PrettySize(RejectSize, str), (double) (RejectSize / size * 100)); fputc ('\n', F) ; if(innconf->logstatus) { @@ -316,7 +316,7 @@ "accepted size %.0f duplicate size %.0f rejected size %.0f\n", "ME", (long) seconds, accepted, refused, rejected, duplicate, - size, DuplicateSize, RejectSize); + (double) size, (double) DuplicateSize, (double) RejectSize); } /* Incoming Feeds */ @@ -370,7 +370,8 @@ "accepted size %.0f duplicate size %.0f rejected size %.0f\n", status->name, (long) status->seconds, status->accepted, status->refused, status->rejected, status->Duplicate, - status->Size, status->DuplicateSize, status->RejectSize); + (double) status->Size, (double) status->DuplicateSize, + (double) status->RejectSize); } tmp = status->next; Modified: innfeed/configfile.l =================================================================== --- innfeed/configfile.l 2018-12-02 14:05:50 UTC (rev 10304) +++ innfeed/configfile.l 2018-12-02 14:21:56 UTC (rev 10305) @@ -25,8 +25,10 @@ /* Some versions of flex (such as 2.6.1-1.3 in Debian stretch) declare a variable as int that should be size_t. We can't really do much about - that, and it's fixed in current flex, so just suppress the warning. */ + that, and it's fixed in current flex, so just suppress the warning. + Same thing for a possible NULL pointer dereference. */ #pragma GCC diagnostic ignored "-Wsign-compare" +#pragma GCC diagnostic ignored "-Wnull-dereference" #if defined (FLEX_DEBUG) #define YY_USER_INIT yy_flex_debug = (getenv ("YYDEBUG") == NULL ? 0 : 1) Modified: innfeed/host.c =================================================================== --- innfeed/host.c 2018-12-02 14:05:50 UTC (rev 10304) +++ innfeed/host.c 2018-12-02 14:21:56 UTC (rev 10305) @@ -2124,7 +2124,7 @@ if (hostsLeft == 0) { snprintf(msgstr, sizeof(msgstr), "accsize %.0f rejsize %.0f", - procArtsSizeAccepted, procArtsSizeRejected); + (double) procArtsSizeAccepted, (double) procArtsSizeRejected); notice ("ME global seconds %ld offered %ld accepted %ld refused %ld" " rejected %ld missing %ld %s spooled %ld unspooled %ld", (long) (now - start), @@ -3473,7 +3473,7 @@ double cnt = (host->blCount) ? (host->blCount) : 1.0; double size; char *tsize; - char buf[]="1.23e+5 TB"; /* usual length is shorter, like "12.3 MB" */ + char buf[]="1.234e+05 TB"; /* usual length is shorter, like "12.34 MB" */ ASSERT (host != NULL) ; ASSERT (fp != NULL) ; @@ -3614,19 +3614,20 @@ #ifdef XXX_STATSHACK { - time_t now = time(NULL), sec = (long) (now - host->connectTime); - float or, ar, rr, jr; + time_t now2 = time(NULL); + time_t sec2 = (long) (now2 - host->connectTime); + double or, ar, rr, jr; - if (sec != 0) { - or = (float) host->artsOffered / (float) sec; - ar = (float) host->artsAccepted / (float) sec; - rr = (float) host->artsNotWanted / (float) sec; - jr = (float) host->artsRejected / (float) sec; - fprintf(fp, "\t\tor %02.2f ar %02.2f rr %02.2f jr %02.2f\n", + if (sec2 != 0) { + or = (double) host->artsOffered / (double) sec2; + ar = (double) host->artsAccepted / (double) sec2; + rr = (double) host->artsNotWanted / (double) sec2; + jr = (double) host->artsRejected / (double) sec2; + fprintf(fp, " or %02.2f ar %02.2f rr %02.2f jr %02.2f\n", or, ar, rr, jr); } - fprintf(fp, "\tmissing %d spooled %d\n", - host->artsMissing,host->backlogSpooled); + fprintf(fp, " missing %u spooled %u\n", + host->artsMissing, host->artsToTape); } #endif /* XXX_STATSHACK */ Modified: innfeed/imap_connection.c =================================================================== --- innfeed/imap_connection.c 2018-12-02 14:05:50 UTC (rev 10304) +++ innfeed/imap_connection.c 2018-12-02 14:21:56 UTC (rev 10305) @@ -1290,6 +1290,9 @@ return SASL_OK; } +#if __GNUC__ > 7 +# pragma GCC diagnostic ignored "-Wcast-function-type" +#endif /* callbacks we support */ static sasl_callback_t saslcallbacks[] = { @@ -1306,6 +1309,10 @@ } }; +#if __GNUC__ > 7 +# pragma GCC diagnostic warning "-Wcast-function-type" +#endif + static sasl_security_properties_t *make_secprops(int min,int max) { sasl_security_properties_t *ret= @@ -1354,7 +1361,8 @@ { sasl_security_properties_t *secprops=NULL; socklen_t addrsize = sizeof(struct sockaddr_in); - char localip[60], remoteip[60]; + char localip[NI_MAXHOST+NI_MAXSERV+1]; + char remoteip[NI_MAXHOST+NI_MAXSERV+1]; struct sockaddr_in saddr_l; struct sockaddr_in saddr_r; Modified: innfeed/misc.c =================================================================== --- innfeed/misc.c 2018-12-02 14:05:50 UTC (rev 10304) +++ innfeed/misc.c 2018-12-02 14:21:56 UTC (rev 10305) @@ -381,7 +381,7 @@ bool lockFile (const char *fileName) { char buff [20] ; - char tmpName [PATH_MAX], realName [PATH_MAX] ; + char tmpName [PATH_MAX+sizeof(long)+10], realName [PATH_MAX] ; char *p ; int fd, i ; pid_t pid = getpid () ; Modified: nnrpd/misc.c =================================================================== --- nnrpd/misc.c 2018-12-02 14:05:50 UTC (rev 10304) +++ nnrpd/misc.c 2018-12-02 14:21:56 UTC (rev 10305) @@ -217,7 +217,7 @@ PostRecFilename(char *ip, char *user) { static char buff[SPOOLNAMEBUFF]; - char dirbuff[SPOOLNAMEBUFF]; + char dirbuff[SMBUF+2+3*3]; struct in_addr inaddr; unsigned long int addr; unsigned char quads[4]; Modified: nnrpd/perl.c =================================================================== --- nnrpd/perl.c 2018-12-02 14:05:50 UTC (rev 10304) +++ nnrpd/perl.c 2018-12-02 14:21:56 UTC (rev 10305) @@ -45,7 +45,7 @@ /* #define DEBUG_MODIFY only if you want to see verbose output. */ #ifdef DEBUG_MODIFY static FILE *flog; -void dumpTable(char *msg); +void dumpTable(const char *msg); #endif /* DEBUG_MODIFY */ char * @@ -435,7 +435,7 @@ #ifdef DEBUG_MODIFY void -dumpTable (char *msg) +dumpTable (const char *msg) { HEADER *hp; int i; Modified: nnrpd/post.c =================================================================== --- nnrpd/post.c 2018-12-02 14:05:50 UTC (rev 10304) +++ nnrpd/post.c 2018-12-02 14:21:56 UTC (rev 10305) @@ -341,10 +341,10 @@ static char orgbuff[SMBUF]; static char pathidentitybuff[SMBUF]; static char complaintsbuff[SMBUF]; - static char postingaccountbuff[SMBUF]; - static char postinghostbuff[SMBUF*2]; /* Allocate enough room. */ + static char postingaccountbuff[SMBUF*2]; /* Allocate enough room. */ + static char postinghostbuff[SMBUF*2]; static char sendbuff[SMBUF*2]; - static char injectioninfobuff[SMBUF]; + static char injectioninfobuff[SMBUF*7]; static char *newpath = NULL; HEADER *hp; char *p; Modified: nnrpd/python.c =================================================================== --- nnrpd/python.c 2018-12-02 14:05:50 UTC (rev 10304) +++ nnrpd/python.c 2018-12-02 14:21:56 UTC (rev 10305) @@ -132,7 +132,7 @@ ** or -1 if method is not defined. */ void -PY_authenticate(char* file, char *Username, char *Password, int *code, +PY_authenticate(char* file, char *User, char *Password, int *code, char *errorstring, char *newUser) { PyObject *result, *item, *proc; @@ -177,10 +177,10 @@ PyDict_SetItemString(PYauthinfo, PYTHONintport, PYauthitem[authnum++]); /* Username if known. */ - if (Username == NULL) { + if (User == NULL) { PYauthitem[authnum] = Py_None; } else { - PYauthitem[authnum] = PYBUFF_FROMMEMORY(Username, strlen(Username)); + PYauthitem[authnum] = PYBUFF_FROMMEMORY(User, strlen(User)); } PyDict_SetItemString(PYauthinfo, PYTHONuser, PYauthitem[authnum++]); @@ -275,7 +275,7 @@ ** If the access group cannot be generated, the connection is closed. */ void -PY_access(char* file, struct vector *access_vec, char *Username) +PY_access(char* file, struct vector *access_vec, char *User) { PyObject *result, *key, *value, *proc; char *buffer; @@ -323,7 +323,7 @@ PyDict_SetItemString(PYauthinfo, PYTHONintport, PYauthitem[authnum++]); /* Username. */ - PYauthitem[authnum] = PYBUFF_FROMMEMORY(Username, strlen(Username)); + PYauthitem[authnum] = PYBUFF_FROMMEMORY(User, strlen(User)); PyDict_SetItemString(PYauthinfo, PYTHONuser, PYauthitem[authnum++]); /* Password is not known. */ @@ -410,7 +410,7 @@ ** Return negative value if dynamic method is not defined. */ int -PY_dynamic(char *Username, char *NewsGroup, int PostFlag, char **reply_message) +PY_dynamic(char *User, char *NewsGroup, int PostFlag, char **reply_message) { PyObject *result, *proc; char *string, *temp; @@ -454,7 +454,7 @@ PyDict_SetItemString(PYauthinfo, PYTHONintport, PYauthitem[authnum++]); /* Username. */ - PYauthitem[authnum] = PYBUFF_FROMMEMORY(Username, strlen(Username)); + PYauthitem[authnum] = PYBUFF_FROMMEMORY(User, strlen(User)); PyDict_SetItemString(PYauthinfo, PYTHONuser, PYauthitem[authnum++]); /* Password is not known. */ Modified: samples/innwatch.ctl =================================================================== --- samples/innwatch.ctl 2018-12-02 14:05:50 UTC (rev 10304) +++ samples/innwatch.ctl 2018-12-02 14:21:56 UTC (rev 10305) @@ -4,13 +4,13 @@ ## ## Indicates what to run to test the state of the news system, and what ## to do about it. Format: -## !state!when!command!test!limit!command!reason/comment +## !state!when!condition!test!limit!command!reason/comment ## where -## Delimiter; pick from [,:@;?!]. +## Delimiter; pick from [!,:@;?]. ## State to enter if true. ## States we must be in to match. -## Command to run to test condition. -## Operator to use in test(1) command. +## Command to run to test condition. +## Operator to use in test(1) condition. ## Value to test against. ## Command for innwatch to perform; use exit, ## flush, go, pause, shutdown, skip, or throttle. Modified: storage/buffindexed/buffindexed.c =================================================================== --- storage/buffindexed/buffindexed.c 2018-12-02 14:05:50 UTC (rev 10304) +++ storage/buffindexed/buffindexed.c 2018-12-02 14:21:56 UTC (rev 10305) @@ -731,7 +731,7 @@ ovflushhead(ovbuff); } #ifdef OV_DEBUG - ovbuff->trace = xcalloc(ovbuff->totalblk, sizeof(ov_trace_array)); + ovbuff->trace = xcalloc(ovbuff->totalblk, sizeof(struct ov_trace_array)); #endif /* OV_DEBUG */ ovlock(ovbuff, INN_LOCK_UNLOCK); } @@ -1387,9 +1387,6 @@ OVBUFF *ovbuff; OVINDEXHEAD ovindexhead; bool needupdate = false; -#ifdef OV_DEBUG - int recno; -#endif /* OV_DEBUG */ Nospace = false; if (OV_BLOCKSIZE < len) { @@ -1877,7 +1874,7 @@ search->gdb.datablk.index = srchov.index; ovbuff = getovbuff(srchov); if (ovbuff == NULL) { - warn("buffindexed: ovsearch could not get ovbuff block for new, %d, %d, %ld", srchov.index, srchov.blocknum, *artnum); + warn("buffindexed: ovsearch could not get ovbuff block for new, %d, %d", srchov.index, srchov.blocknum); return false; } offset = ovbuff->base + OV_OFFSET(srchov.blocknum); @@ -2068,15 +2065,18 @@ void *handle; GROUPENTRY newge, *ge; GROUPLOC gloc, next; - char *data; - int i, len; + char *data = NULL; + int i; + int len = 0; TOKEN token; - ARTNUM artnum, low, high; + ARTNUM artnum = 0; + ARTNUM low, high; ARTHANDLE *ah; char flag; HASH hash; - time_t arrived, expires; - OVSEARCH search; + time_t arrived = 0; + time_t expires = 0; + OVSEARCH search = { 0 }; if (group == NULL) { for (i = 0 ; i < GROUPheader->freelist.recno ; i++) { @@ -2172,7 +2172,11 @@ warn("buffindexed: cannot prepare free operation"); return false; } +#ifdef OV_DEBUG + freegroupblock(ge); +#else freegroupblock(); +#endif /* OV_DEBUG */ ovgroupunmap(); return false; @@ -2263,7 +2267,8 @@ FILE *F = NULL; pid_t pid; char *path = NULL; - int i,j; + size_t i; + int j; struct ov_trace_array *trace; struct ov_name_table *ntp; size_t length; @@ -2289,7 +2294,7 @@ break; } } - fprintf(F, "%d: % 6d, % 2d: 0x%08x, % 10d, % 10d\n", ovbuff->index, i, j, + fprintf(F, "%d: % 6ld, % 2d: 0x%08x, % 10ld, % 10ld\n", ovbuff->index, i, j, trace->ov_trace[j].gloc.recno, trace->ov_trace[j].occupied, trace->ov_trace[j].freed); @@ -2302,7 +2307,7 @@ length = strlen(innconf->pathtmp) + 11; path = xmalloc(length); pid = getpid(); - sprintf(path, length, "%s/%d", innconf->pathtmp, pid); + snprintf(path, length, "%s/%d", innconf->pathtmp, pid); if ((F = fopen(path, "w")) == NULL) { syswarn("buffindexed: could not open %s", path); } Modified: storage/buffindexed/shmem.c =================================================================== --- storage/buffindexed/shmem.c 2018-12-02 14:05:50 UTC (rev 10304) +++ storage/buffindexed/shmem.c 2018-12-02 14:21:56 UTC (rev 10305) @@ -18,9 +18,14 @@ #include "inn/messages.h" #include "inn/libinn.h" #include "shmem.h" - + +#ifdef _TEST_ +# include /* for openlog */ +# include /* for flock */ +#endif + #ifndef MAP_FAILED - #define MAP_FAILED ((caddr_t)-1) +# define MAP_FAILED ((caddr_t)-1) #endif static int smcGetSemaphore(const char *name) @@ -285,10 +290,10 @@ #ifdef _TEST_ /* Check if the testfile exists. - If the file is absent - create one with size 1M, and fill the contents with all zero. - for (i=0; i<100; i++) - add 1 to the content; +** If the file is absent, create one with size 1M, and fill the contents +** with all zero. +** for (i=0; i<100; i++) +** add 1 to the content; */ static const char* testfile = "testfile"; #define TESTSIZE ( 1024 * 1024 ) @@ -302,13 +307,11 @@ } } -int main( int argc, char** argv ) +int main(int argc UNUSED, char** argv UNUSED) { - struct stat st; int fd, i, k; int *x; int len, xmin, xmax; - struct flock fl; atexit( myexit ); openlog( "shmemtest", LOG_PID, LOG_DAEMON ); @@ -352,7 +355,7 @@ } for( i=0; iaddr, this->size) != this->size ) { + if( write(fd, this->addr, this->size) != (signed int) this->size ) { printf( "cant write" ); exit(1); } Modified: storage/cnfs/cnfs.c =================================================================== --- storage/cnfs/cnfs.c 2018-12-02 14:05:50 UTC (rev 10304) +++ storage/cnfs/cnfs.c 2018-12-02 14:21:56 UTC (rev 10305) @@ -1389,7 +1389,7 @@ *(CNFSARTHEADER *)&cahh = cah; if(pread(cycbuff->fd, ((char *)&cahh)+sizeof(CNFSARTHEADER), sizeof(oldCNFSARTHEADER)-sizeof(CNFSARTHEADER), offset+sizeof(cah)) != sizeof(oldCNFSARTHEADER)-sizeof(CNFSARTHEADER)) { SMseterror(SMERR_UNDEFINED, "read2 failed"); - syswarn("CNFS: could not read2 token %s %s:0x%s:%ld: %m", + syswarn("CNFS: could not read2 token %s %s:0x%s:%u: %m", TokenToText(token), cycbuffname, CNFSofft2hex(offset, false), cycnum); free(art); Modified: storage/ovdb/ovdb.c =================================================================== --- storage/ovdb/ovdb.c 2018-12-02 14:05:50 UTC (rev 10304) +++ storage/ovdb/ovdb.c 2018-12-02 14:21:56 UTC (rev 10305) @@ -599,7 +599,7 @@ static int open_db_file(int which) { int ret; - char name[10]; + char name[16]; DB_TXN *tid; if(dbs[which] != NULL) Modified: tests/lib/date-t.c =================================================================== --- tests/lib/date-t.c 2018-12-02 14:05:50 UTC (rev 10304) +++ tests/lib/date-t.c 2018-12-02 14:21:56 UTC (rev 10305) @@ -105,18 +105,20 @@ tmp_tm = localtime(×tamp); tm = *tmp_tm; - sprintf(date, "%02d%02d%02d", tm.tm_year % 100, tm.tm_mon + 1, - tm.tm_mday); - sprintf(hour, "%02d%02d%02d", tm.tm_hour, tm.tm_min, tm.tm_sec); + snprintf(date, sizeof(date), "%02d%02d%02d", + tm.tm_year % 100, tm.tm_mon + 1, tm.tm_mday); + snprintf(hour, sizeof(hour), "%02d%02d%02d", + tm.tm_hour, tm.tm_min, tm.tm_sec); ok_nntp((*n)++, timestamp, date, hour, true); - sprintf(date, "%04d%02d%02d", tm.tm_year + 1900, tm.tm_mon + 1, - tm.tm_mday); + snprintf(date, sizeof(date), "%04d%02d%02d", + tm.tm_year + 1900, tm.tm_mon + 1, tm.tm_mday); ok_nntp((*n)++, timestamp, date, hour, true); tmp_tm = gmtime(×tamp); tm = *tmp_tm; - sprintf(date, "%04d%02d%02d", tm.tm_year + 1900, tm.tm_mon + 1, - tm.tm_mday); - sprintf(hour, "%02d%02d%02d", tm.tm_hour, tm.tm_min, tm.tm_sec); + snprintf(date, sizeof(date), "%04d%02d%02d", + tm.tm_year + 1900, tm.tm_mon + 1, tm.tm_mday); + snprintf(hour, sizeof(hour), "%02d%02d%02d", + tm.tm_hour, tm.tm_min, tm.tm_sec); ok_nntp((*n)++, timestamp, date, hour, false); } From rra at isc.org Sun Dec 2 14:26:16 2018 From: rra at isc.org (INN Commit) Date: Sun, 2 Dec 2018 06:26:16 -0800 (PST) Subject: INN commit: branches/2.6 (14 files) Message-ID: <20181202142616.6DB4967D58@hope.eyrie.org> Date: Sunday, December 2, 2018 @ 06:26:13 Author: iulius Revision: 10306 Update to latest rra-c-util upstream version The Autoconf m4 macros now check that the library's key header can be found as well as the library. It removes the need of several checks added in configure.ac to achieve that. Also fix INN_LIB_KRB5_OPTIONAL probing in the --enable-reduced-depends case when linking with libkrb5 is not possible but libcom_err is present. The probes for com_err were previously not skipped, resulting in a non-empty KRB5_LIBS containing only -lcom_err, which incorrectly caused the macro to indicate that Kerberos libraries were present. Modified: branches/2.6/configure.ac branches/2.6/innfeed/imap_connection.c branches/2.6/m4/bdb.m4 branches/2.6/m4/krb5.m4 branches/2.6/m4/lib-helper.m4 branches/2.6/m4/openssl.m4 branches/2.6/m4/sasl.m4 branches/2.6/m4/zlib.m4 branches/2.6/nnrpd/nnrpd.h branches/2.6/nnrpd/tls.h branches/2.6/storage/ovdb/ovdb-private.h branches/2.6/storage/ovdb/ovdb.c branches/2.6/tests/tap/libtap.sh branches/2.6/tests/tap/macros.h -----------------------------+ configure.ac | 100 +----------------------------------------- innfeed/imap_connection.c | 3 - m4/bdb.m4 | 13 +++-- m4/krb5.m4 | 39 ++++++++-------- m4/lib-helper.m4 | 9 +++ m4/openssl.m4 | 45 +++++++++++------- m4/sasl.m4 | 13 +++-- m4/zlib.m4 | 13 +++-- nnrpd/nnrpd.h | 6 -- nnrpd/tls.h | 3 - storage/ovdb/ovdb-private.h | 6 +- storage/ovdb/ovdb.c | 6 -- tests/tap/libtap.sh | 4 - tests/tap/macros.h | 2 14 files changed, 95 insertions(+), 167 deletions(-) Modified: configure.ac =================================================================== --- configure.ac 2018-12-02 14:21:56 UTC (rev 10305) +++ configure.ac 2018-12-02 14:26:13 UTC (rev 10306) @@ -417,31 +417,9 @@ AS_IF([test x"$inn_use_KRB5" = xtrue], [KRB5_AUTH=auth_krb5]) AC_SUBST([KRB5_AUTH]) -dnl If Berkeley DB is found, check the presence of its header and whether the -dnl Berkeley DB library has ndbm support. -AS_IF([test x"$inn_use_BDB" = xtrue], - [inn_BDB_incroot= - inn_BDB_header_found= - AS_IF([test x"$inn_BDB_includedir" != x], - [inn_BDB_incroot="$inn_BDB_includedir"], - [AS_IF([test x"$inn_BDB_root" != x], - [inn_BDB_incroot="${inn_BDB_root}/include"])]) - AS_IF([test x"$inn_BDB_incroot" = x], - [AC_CHECK_HEADERS([db.h], - [inn_BDB_header_found=yes], - [inn_BDB_header_found=no])], - [AS_IF([test -f "${inn_BDB_incroot}/db.h"], - [inn_BDB_header_found=yes - AC_DEFINE([HAVE_DB_H], [1], - [Define if you have the header file.])], - [inn_BDB_header_found=no])]) - AS_IF([test x"${inn_BDB_header_found}" = xyes], - [INN_LIB_BDB_NDBM], - [AS_IF([test x"$with_bdb" = x], - [BDB_CPPFLAGS= - BDB_LDFLAGS= - BDB_LIBS=], - [AC_MSG_ERROR([cannot find usable Berkeley DB header])])])]) +dnl If Berkeley DB is found, check whether the Berkeley DB library +dnl has ndbm support. +AS_IF([test x"$inn_use_BDB" = xtrue], [INN_LIB_BDB_NDBM]) dnl The dbm libraries are a special case. If we're building with Berkeley DB, dnl just use the ndbm support provided by it. @@ -456,78 +434,6 @@ AC_SUBST([DBM_LIBS])]) AC_SUBST([DBM_CPPFLAGS]) -dnl If zlib support is found, check the presence of its header. -AS_IF([test x"$inn_use_ZLIB" = xtrue], - [inn_ZLIB_incroot= - inn_ZLIB_header_found= - AS_IF([test x"$inn_ZLIB_includedir" != x], - [inn_ZLIB_incroot="$inn_ZLIB_includedir"], - [AS_IF([test x"$inn_ZLIB_root" != x], - [inn_ZLIB_incroot="${inn_ZLIB_root}/include"])]) - AS_IF([test x"$inn_ZLIB_incroot" = x], - [AC_CHECK_HEADERS([zlib.h], - [inn_ZLIB_header_found=yes], - [inn_ZLIB_header_found=no])], - [AS_IF([test -f "${inn_ZLIB_incroot}/zlib.h"], - [inn_ZLIB_header_found=yes - AC_DEFINE([HAVE_ZLIB_H], [1], - [Define if you have the header file.])], - [inn_ZLIB_header_found=no])]) - AS_IF([test x"${inn_ZLIB_header_found}" = xyes], [], - [AS_IF([test x"$with_zlib" = x], - [ZLIB_CPPFLAGS= - ZLIB_LDFLAGS= - ZLIB_LIBS=], - [AC_MSG_ERROR([cannot find usable zlib header])])])]) - -dnl If OpenSSL support is found, check the presence of its header. -AS_IF([test x"$inn_use_OPENSSL" = xtrue], - [inn_OPENSSL_incroot= - inn_OPENSSL_header_found= - AS_IF([test x"$inn_OPENSSL_includedir" != x], - [inn_OPENSSL_incroot="$inn_OPENSSL_includedir"], - [AS_IF([test x"$inn_OPENSSL_root" != x], - [inn_OPENSSL_incroot="${inn_OPENSSL_root}/include"])]) - AS_IF([test x"$inn_OPENSSL_incroot" = x], - [AC_CHECK_HEADERS([openssl/ssl.h], - [inn_OPENSSL_header_found=yes], - [inn_OPENSSL_header_found=no])], - [AS_IF([test -f "${inn_OPENSSL_incroot}/openssl/ssl.h"], - [inn_OPENSSL_header_found=yes - AC_DEFINE([HAVE_OPENSSL_SSL_H], [1], - [Define if you have the header file.])], - [inn_OPENSSL_header_found=no])]) - AS_IF([test x"${inn_OPENSSL_header_found}" = xyes], [], - [AS_IF([test x"$with_openssl" = x], - [OPENSSL_CPPFLAGS= - OPENSSL_LDFLAGS= - OPENSSL_LIBS=], - [AC_MSG_ERROR([cannot find usable OpenSSL header])])])]) - -dnl If SASL support is found, check the presence of its header. -AS_IF([test x"$inn_use_SASL" = xtrue], - [inn_SASL_incroot= - inn_SASL_header_found= - AS_IF([test x"$inn_SASL_includedir" != x], - [inn_SASL_incroot="$inn_SASL_includedir"], - [AS_IF([test x"$inn_SASL_root" != x], - [inn_SASL_incroot="${inn_SASL_root}/include"])]) - AS_IF([test x"$inn_SASL_incroot" = x], - [AC_CHECK_HEADERS([sasl/sasl.h], - [inn_SASL_header_found=yes], - [inn_SASL_header_found=no])], - [AS_IF([test -f "${inn_SASL_incroot}/sasl/sasl.h"], - [inn_SASL_header_found=yes - AC_DEFINE([HAVE_SASL_SASL_H], [1], - [Define if you have the header file.])], - [inn_SASL_header_found=no])]) - AS_IF([test x"${inn_SASL_header_found}" = xyes], [], - [AS_IF([test x"$with_sasl" = x], - [SASL_CPPFLAGS= - SASL_LDFLAGS= - SASL_LIBS=], - [AC_MSG_ERROR([cannot find usable Cyrus SASL header])])])]) - dnl If configuring with large file support, determine the right flags to dnl use based on the platform. if test x"$inn_enable_largefiles" = xyes ; then Modified: innfeed/imap_connection.c =================================================================== --- innfeed/imap_connection.c 2018-12-02 14:21:56 UTC (rev 10305) +++ innfeed/imap_connection.c 2018-12-02 14:26:13 UTC (rev 10306) @@ -45,9 +45,6 @@ #include "article.h" #include "configfile.h" -#ifndef HAVE_SASL_SASL_H -# undef HAVE_SASL -#endif #ifdef HAVE_SASL # include # include Modified: m4/bdb.m4 =================================================================== --- m4/bdb.m4 2018-12-02 14:21:56 UTC (rev 10305) +++ m4/bdb.m4 2018-12-02 14:26:13 UTC (rev 10306) @@ -30,6 +30,7 @@ dnl package, available at . dnl dnl Written by Russ Allbery +dnl Copyright 2018 Russ Allbery dnl Copyright 2013 dnl The Board of Trustees of the Leland Stanford Junior University dnl @@ -53,10 +54,13 @@ AC_DEFUN([_INN_LIB_BDB_INTERNAL], [INN_LIB_HELPER_PATHS([BDB]) INN_LIB_BDB_SWITCH - AC_CHECK_LIB([db], [db_create], - [BDB_LIBS="-ldb"], + AC_CHECK_HEADER([db.h], + [AC_CHECK_LIB([db], [db_create], + [BDB_LIBS="-ldb"], + [AS_IF([test x"$1" = xtrue], + [AC_MSG_ERROR([cannot find usable Berkeley DB library])])])], [AS_IF([test x"$1" = xtrue], - [AC_MSG_ERROR([cannot find usable Berkeley DB library])])]) + [AC_MSG_ERROR([cannot find usable Berkeley DB header])])]) INN_LIB_BDB_RESTORE]) dnl The main macro for packages with mandatory Berkeley DB support. @@ -75,7 +79,8 @@ [AS_IF([test x"$inn_use_BDB" = xtrue], [_INN_LIB_BDB_INTERNAL([true])], [_INN_LIB_BDB_INTERNAL([false])])]) - AS_IF([test x"$BDB_LIBS" != x], + AS_IF([test x"$BDB_LIBS" = x], + [INN_LIB_HELPER_VAR_CLEAR([BDB])], [inn_use_BDB=true AC_DEFINE([HAVE_BDB], 1, [Define if libdb is available.])])]) Modified: m4/krb5.m4 =================================================================== --- m4/krb5.m4 2018-12-02 14:21:56 UTC (rev 10305) +++ m4/krb5.m4 2018-12-02 14:26:13 UTC (rev 10306) @@ -51,7 +51,7 @@ dnl package, available at . dnl dnl Written by Russ Allbery -dnl Copyright 2005-2011, 2013-2014 +dnl Copyright 2005-2011, 2013-2014, 2018 dnl The Board of Trustees of the Leland Stanford Junior University dnl dnl This file is free software; the authors give unlimited permission to copy @@ -140,26 +140,27 @@ dnl be found. AC_DEFUN([_INN_LIB_KRB5_REDUCED], [INN_LIB_KRB5_SWITCH - AC_CHECK_LIB([krb5], [krb5_init_context], [KRB5_LIBS="-lkrb5"], + AC_CHECK_LIB([krb5], [krb5_init_context], + [KRB5_LIBS="-lkrb5" + LIBS="$KRB5_LIBS $LIBS" + _INN_LIB_KRB5_CHECK_HEADER_KRB5 + AC_CHECK_FUNCS([krb5_get_error_message], + [AC_CHECK_FUNCS([krb5_free_error_message])], + [AC_CHECK_FUNCS([krb5_get_error_string], [], + [AC_CHECK_FUNCS([krb5_get_err_txt], [], + [AC_CHECK_LIB([ksvc], [krb5_svc_get_msg], + [KRB5_LIBS="$KRB5_LIBS -lksvc" + AC_DEFINE([HAVE_KRB5_SVC_GET_MSG], [1]) + AC_CHECK_HEADERS([ibm_svc/krb5_svc.h], [], [], + [INN_INCLUDES_KRB5])], + [AC_CHECK_LIB([com_err], [com_err], + [KRB5_LIBS="$KRB5_LIBS -lcom_err"], + [AS_IF([test x"$1" = xtrue], + [AC_MSG_ERROR([cannot find usable com_err library])], + [KRB5_LIBS=""])]) + _INN_LIB_KRB5_CHECK_HEADER_COM_ERR])])])])], [AS_IF([test x"$1" = xtrue], [AC_MSG_ERROR([cannot find usable Kerberos library])])]) - LIBS="$KRB5_LIBS $LIBS" - _INN_LIB_KRB5_CHECK_HEADER_KRB5 - AC_CHECK_FUNCS([krb5_get_error_message], - [AC_CHECK_FUNCS([krb5_free_error_message])], - [AC_CHECK_FUNCS([krb5_get_error_string], [], - [AC_CHECK_FUNCS([krb5_get_err_txt], [], - [AC_CHECK_LIB([ksvc], [krb5_svc_get_msg], - [KRB5_LIBS="$KRB5_LIBS -lksvc" - AC_DEFINE([HAVE_KRB5_SVC_GET_MSG], [1]) - AC_CHECK_HEADERS([ibm_svc/krb5_svc.h], [], [], - [INN_INCLUDES_KRB5])], - [AC_CHECK_LIB([com_err], [com_err], - [KRB5_LIBS="$KRB5_LIBS -lcom_err"], - [AS_IF([test x"$1" = xtrue], - [AC_MSG_ERROR([cannot find usable com_err library])], - [KRB5_LIBS=""])]) - _INN_LIB_KRB5_CHECK_HEADER_COM_ERR])])])]) INN_LIB_KRB5_RESTORE]) dnl Does the appropriate library checks for Kerberos linkage when we don't Modified: m4/lib-helper.m4 =================================================================== --- m4/lib-helper.m4 2018-12-02 14:21:56 UTC (rev 10305) +++ m4/lib-helper.m4 2018-12-02 14:26:13 UTC (rev 10306) @@ -13,6 +13,7 @@ dnl package, available at . dnl dnl Written by Russ Allbery +dnl Copyright 2018 Russ Allbery dnl Copyright 2011, 2013 dnl The Board of Trustees of the Leland Stanford Junior University dnl @@ -91,6 +92,14 @@ AC_SUBST([$1][_LDFLAGS]) AC_SUBST([$1][_LIBS])]) +dnl Unset all of the variables used by a library probe. Used with the +dnl _OPTIONAL versions of header probes when a header or library wasn't found +dnl and therefore the library isn't usable. +AC_DEFUN([INN_LIB_HELPER_VAR_CLEAR], +[$1[]_CPPFLAGS= + $1[]_LDFLAGS= + $1[]_LIBS=]) + dnl Handles --with options for a non-optional library. First argument is the dnl base for the switch names. Second argument is the short description. dnl Third argument is the variable prefix. The variables set are used by Modified: m4/openssl.m4 =================================================================== --- m4/openssl.m4 2018-12-02 14:21:56 UTC (rev 10305) +++ m4/openssl.m4 2018-12-02 14:26:13 UTC (rev 10306) @@ -28,7 +28,7 @@ dnl package, available at . dnl dnl Written by Russ Allbery -dnl Copyright 2016 Russ Allbery +dnl Copyright 2016, 2018 Russ Allbery dnl Copyright 2010, 2013 dnl The Board of Trustees of the Leland Stanford Junior University dnl @@ -49,20 +49,11 @@ AC_DEFUN([INN_LIB_OPENSSL_RESTORE], [INN_LIB_HELPER_RESTORE([OPENSSL])]) AC_DEFUN([INN_LIB_CRYPTO_RESTORE], [INN_LIB_HELPER_RESTORE([CRYPTO])]) -dnl Checks if the OpenSSL and crypto libraries are present. The single -dnl argument, if "true", says to fail if the OpenSSL SSL library could not be -dnl found. -AC_DEFUN([_INN_LIB_OPENSSL_INTERNAL], -[AC_REQUIRE([INN_ENABLE_REDUCED_DEPENDS]) - INN_LIB_HELPER_PATHS([OPENSSL]) - CRYPTO_CPPFLAGS="$OPENSSL_CPPFLAGS" - CRYPTO_LDFLAGS="$OPENSSL_LDFLAGS" - CRYPTO_LIBS= - AC_SUBST([CRYPTO_CPPFLAGS]) - AC_SUBST([CRYPTO_LDFLAGS]) - AC_SUBST([CRYPTO_LIBS]) - INN_LIB_OPENSSL_SWITCH - inn_openssl_extra= +dnl Check for the OpenSSL and crypto libraries and assemble OPENSSL_LIBS and +dnl CRYPTO_LIBS. Helper function for _INN_LIB_OPENSSL_INTERNAL. Must be +dnl called with INN_LIB_OPENSSL_SWITCH enabled. +AC_DEFUN([_INN_LIB_OPENSSL_INTERNAL_LIBS], +[inn_openssl_extra= LIBS= AS_IF([test x"$inn_reduced_depends" != xtrue], [AC_SEARCH_LIBS([dlopen], [dl])]) @@ -81,7 +72,25 @@ [OPENSSL_LIBS="-lssl $CRYPTO_LIBS"], [AS_IF([test x"$1" = xtrue], [AC_MSG_ERROR([cannot find usable OpenSSL library])])], - [$CRYPTO_LIBS])]) + [$CRYPTO_LIBS])])]) + +dnl Checks if the OpenSSL header and OpenSSL and crypto libraries are present. +dnl The single argument, if "true", says to fail if the OpenSSL SSL library +dnl could not be found. +AC_DEFUN([_INN_LIB_OPENSSL_INTERNAL], +[AC_REQUIRE([INN_ENABLE_REDUCED_DEPENDS]) + INN_LIB_HELPER_PATHS([OPENSSL]) + CRYPTO_CPPFLAGS="$OPENSSL_CPPFLAGS" + CRYPTO_LDFLAGS="$OPENSSL_LDFLAGS" + CRYPTO_LIBS= + AC_SUBST([CRYPTO_CPPFLAGS]) + AC_SUBST([CRYPTO_LDFLAGS]) + AC_SUBST([CRYPTO_LIBS]) + INN_LIB_OPENSSL_SWITCH + AC_CHECK_HEADER([openssl/ssl.h], + [_INN_LIB_OPENSSL_INTERNAL_LIBS([$1])], + [AS_IF([test x"$1" = xtrue], + [AC_MSG_ERROR([cannot find usable OpenSSL header])])]) INN_LIB_OPENSSL_RESTORE]) dnl The main macro for packages with mandatory OpenSSL support. @@ -100,6 +109,8 @@ [AS_IF([test x"$inn_use_OPENSSL" = xtrue], [_INN_LIB_OPENSSL_INTERNAL([true])], [_INN_LIB_OPENSSL_INTERNAL([false])])]) - AS_IF([test x"$OPENSSL_LIBS" != x], + AS_IF([test x"$OPENSSL_LIBS" = x], + [INN_LIB_HELPER_VAR_CLEAR([OPENSSL]) + INN_LIB_HELPER_VAR_CLEAR([CRYPTO])], [inn_use_OPENSSL=true AC_DEFINE([HAVE_OPENSSL], 1, [Define if libssl is available.])])]) Modified: m4/sasl.m4 =================================================================== --- m4/sasl.m4 2018-12-02 14:21:56 UTC (rev 10305) +++ m4/sasl.m4 2018-12-02 14:26:13 UTC (rev 10306) @@ -26,6 +26,7 @@ dnl package, available at . dnl dnl Written by Russ Allbery +dnl Copyright 2018 Russ Allbery dnl Copyright 2013 dnl The Board of Trustees of the Leland Stanford Junior University dnl @@ -49,10 +50,13 @@ AC_DEFUN([_INN_LIB_SASL_INTERNAL], [INN_LIB_HELPER_PATHS([SASL]) INN_LIB_SASL_SWITCH - AC_CHECK_LIB([sasl2], [sasl_getprop], - [SASL_LIBS="-lsasl2"], + AC_CHECK_HEADER([sasl/sasl.h], + [AC_CHECK_LIB([sasl2], [sasl_getprop], + [SASL_LIBS="-lsasl2"], + [AS_IF([test x"$1" = xtrue], + [AC_MSG_ERROR([cannot find usable Cyrus SASL library])])])], [AS_IF([test x"$1" = xtrue], - [AC_MSG_ERROR([cannot find usable Cyrus SASL library])])]) + [AC_MSG_ERROR([cannot find usable Cyrus SASL header])])]) INN_LIB_SASL_RESTORE]) dnl The main macro for packages with mandatory Cyrus SASL support. @@ -71,6 +75,7 @@ [AS_IF([test x"$inn_use_SASL" = xtrue], [_INN_LIB_SASL_INTERNAL([true])], [_INN_LIB_SASL_INTERNAL([false])])]) - AS_IF([test x"$SASL_LIBS" != x], + AS_IF([test x"$SASL_LIBS" = x], + [INN_LIB_HELPER_VAR_CLEAR([SASL])], [inn_use_SASL=true AC_DEFINE([HAVE_SASL], 1, [Define if libsasl2 is available.])])]) Modified: m4/zlib.m4 =================================================================== --- m4/zlib.m4 2018-12-02 14:21:56 UTC (rev 10305) +++ m4/zlib.m4 2018-12-02 14:26:13 UTC (rev 10306) @@ -24,6 +24,7 @@ dnl package, available at . dnl dnl Written by Russ Allbery +dnl Copyright 2018 Russ Allbery dnl Copyright 2013 dnl The Board of Trustees of the Leland Stanford Junior University dnl @@ -47,10 +48,13 @@ AC_DEFUN([_INN_LIB_ZLIB_INTERNAL], [INN_LIB_HELPER_PATHS([ZLIB]) INN_LIB_ZLIB_SWITCH - AC_CHECK_LIB([z], [compress], - [ZLIB_LIBS="-lz"], + AC_CHECK_HEADER([zlib.h], + [AC_CHECK_LIB([z], [compress], + [ZLIB_LIBS="-lz"], + [AS_IF([test x"$1" = xtrue], + [AC_MSG_ERROR([cannot find usable zlib library])])])], [AS_IF([test x"$1" = xtrue], - [AC_MSG_ERROR([cannot find usable zlib library])])]) + [AC_MSG_ERROR([cannot find usable zlib header])])]) INN_LIB_ZLIB_RESTORE]) dnl The main macro for packages with mandatory zlib support. @@ -69,6 +73,7 @@ [AS_IF([test x"$inn_use_ZLIB" = xtrue], [_INN_LIB_ZLIB_INTERNAL([true])], [_INN_LIB_ZLIB_INTERNAL([false])])]) - AS_IF([test x"$ZLIB_LIBS" != x], + AS_IF([test x"$ZLIB_LIBS" = x], + [INN_LIB_HELPER_VAR_CLEAR([ZLIB])], [inn_use_ZLIB=true AC_DEFINE([HAVE_ZLIB], 1, [Define if libz is available.])])]) Modified: nnrpd/nnrpd.h =================================================================== --- nnrpd/nnrpd.h 2018-12-02 14:21:56 UTC (rev 10305) +++ nnrpd/nnrpd.h 2018-12-02 14:26:13 UTC (rev 10306) @@ -26,17 +26,11 @@ #include "inn/vector.h" #include "inn/timer.h" -#ifndef HAVE_SASL_SASL_H -# undef HAVE_SASL -#endif #ifdef HAVE_SASL #include #include #endif -#if !defined(HAVE_ZLIB_H) -# undef HAVE_ZLIB -#endif #if defined(HAVE_ZLIB) # include #endif Modified: nnrpd/tls.h =================================================================== --- nnrpd/tls.h 2018-12-02 14:21:56 UTC (rev 10305) +++ nnrpd/tls.h 2018-12-02 14:26:13 UTC (rev 10306) @@ -14,9 +14,6 @@ ** by Chris Newman (1999/06) */ -#ifndef HAVE_OPENSSL_SSL_H -# undef HAVE_OPENSSL -#endif #ifdef HAVE_OPENSSL #ifndef TLS_H Modified: storage/ovdb/ovdb-private.h =================================================================== --- storage/ovdb/ovdb-private.h 2018-12-02 14:21:56 UTC (rev 10305) +++ storage/ovdb/ovdb-private.h 2018-12-02 14:26:13 UTC (rev 10306) @@ -1,6 +1,6 @@ -#ifndef HAVE_DB_H -# undef HAVE_BDB -#endif +/* $Id$ +*/ + #ifdef HAVE_BDB #include Modified: storage/ovdb/ovdb.c =================================================================== --- storage/ovdb/ovdb.c 2018-12-02 14:21:56 UTC (rev 10305) +++ storage/ovdb/ovdb.c 2018-12-02 14:26:13 UTC (rev 10306) @@ -1,4 +1,5 @@ -/* +/* $Id$ + * * ovdb.c * ovdb 2.00 * Overview storage using Berkeley DB 4.4 or higher @@ -82,9 +83,6 @@ #ifdef HAVE_SYS_SELECT_H # include #endif -#ifndef HAVE_ZLIB_H -# undef HAVE_ZLIB -#endif #ifdef HAVE_ZLIB # include # define MAX_UNZIP_SZ 100000 Modified: tests/tap/libtap.sh =================================================================== --- tests/tap/libtap.sh 2018-12-02 14:21:56 UTC (rev 10305) +++ tests/tap/libtap.sh 2018-12-02 14:26:13 UTC (rev 10306) @@ -12,8 +12,8 @@ # . # # Written by Russ Allbery -# Copyright 2009, 2010, 2011, 2012, 2016 Russ Allbery -# Copyright 2006, 2007, 2008, 2013 +# Copyright 2009-2012, 2016 Russ Allbery +# Copyright 2006-2008, 2013 # The Board of Trustees of the Leland Stanford Junior University # # Permission is hereby granted, free of charge, to any person obtaining a copy Modified: tests/tap/macros.h =================================================================== --- tests/tap/macros.h 2018-12-02 14:21:56 UTC (rev 10305) +++ tests/tap/macros.h 2018-12-02 14:26:13 UTC (rev 10306) @@ -9,7 +9,7 @@ * This file is part of C TAP Harness. The current version plus supporting * documentation is at . * - * Copyright 2008, 2012, 2013, 2015 Russ Allbery + * Copyright 2008, 2012-2013, 2015 Russ Allbery * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), From rra at isc.org Sun Dec 2 14:31:43 2018 From: rra at isc.org (INN Commit) Date: Sun, 2 Dec 2018 06:31:43 -0800 (PST) Subject: INN commit: branches/2.6 (3 files) Message-ID: <20181202143143.8C26767D58@hope.eyrie.org> Date: Sunday, December 2, 2018 @ 06:31:42 Author: iulius Revision: 10307 Update to latest rra-c-util upstream version, improving Perl and Python support at configure time Modified: branches/2.6/m4/perl.m4 branches/2.6/m4/python.m4 branches/2.6/support/getrra-c-util -----------------------+ m4/perl.m4 | 30 ++++++++++-- m4/python.m4 | 111 ++++++++++++++++++++++++++++++++++++------------ support/getrra-c-util | 1 3 files changed, 109 insertions(+), 33 deletions(-) Modified: m4/perl.m4 =================================================================== --- m4/perl.m4 2018-12-02 14:26:13 UTC (rev 10306) +++ m4/perl.m4 2018-12-02 14:31:42 UTC (rev 10307) @@ -6,20 +6,27 @@ dnl INN_PROG_PERL dnl Checks for a specific Perl version and sets the PERL environment dnl variable to the full path, or aborts the configure run if the version -dnl of Perl is not new enough or couldn't be found. +dnl of Perl is not new enough or couldn't be found. Marks PERL as a +dnl substitution variable. dnl dnl INN_PERL_CHECK_MODULE -dnl Checks for the existence of a Perl module and runs provided code based -dnl on whether or not it was found. +dnl Checks for the existence of a Perl module. Runs the second argument +dnl if it is present and the third if it is not. dnl dnl INN_LIB_PERL dnl Determines the flags required for embedding Perl and sets dnl PERL_CPPFLAGS and PERL_LIBS. dnl +dnl INN_PROG_PERL should generally be called before the other two macros. If +dnl it isn't, the PERL environment variable must be set in some other way. +dnl (It cannot be run automatically via dependencies because it takes a +dnl mandatory minimum version argument, which should be provided by the +dnl calling configure script.) +dnl dnl The canonical version of this file is maintained in the rra-c-util dnl package, available at . dnl -dnl Copyright 2016 Russ Allbery +dnl Copyright 2016, 2018 Russ Allbery dnl Copyright 2006, 2009, 2011 Internet Systems Consortium, Inc. ("ISC") dnl Copyright 1998-2003 The Internet Software Consortium dnl @@ -54,7 +61,8 @@ ac_path_PERL_found=:])])]) AS_IF([test x"$ac_cv_path_PERL" = x], [AC_MSG_ERROR([Perl $1 or greater is required])]) - PERL="$ac_cv_path_PERL"])]) + PERL="$ac_cv_path_PERL" + AC_SUBST([PERL])])]) dnl Check whether a given Perl module can be loaded. Runs the second argument dnl if it can, and the third argument if it cannot. @@ -97,4 +105,14 @@ inn_perl_core_libs=`echo "$inn_perl_core_libs" | sed 's/ *$//'` PERL_CPPFLAGS="$inn_perl_core_flags" PERL_LIBS="$inn_perl_core_libs" - AC_MSG_RESULT([$PERL_LIBS])]) + AC_MSG_RESULT([$PERL_LIBS]) + inn_perl_save_CPPFLAGS="$CPPFLAGS" + inn_perl_save_LIBS="$LIBS" + CPPFLAGS="$PERL_CPPFLAGS $CPPFLAGS" + LIBS="$PERL_LIBS $LIBS" + AC_CHECK_HEADER([EXTERN.h], [], + [AC_MSG_FAILURE([unable to compile with EXTERN.h])]) + AC_CHECK_FUNC([perl_alloc], [], + [AC_MSG_FAILURE([unable to link with Perl library])]) + CPPFLAGS="$inn_perl_save_CPPFLAGS" + LIBS="$inn_perl_save_LIBS"]) Modified: m4/python.m4 =================================================================== --- m4/python.m4 2018-12-02 14:26:13 UTC (rev 10306) +++ m4/python.m4 2018-12-02 14:31:42 UTC (rev 10307) @@ -6,7 +6,9 @@ dnl INN_PROG_PYTHON dnl Checks for a specific Python version and sets the PYTHON environment dnl variable to the full path, or aborts the configure run if the version -dnl of Python is not new enough or couldn't be found. +dnl of Python is not new enough or couldn't be found. Marks PYTHON as a +dnl substitution variable. +dnl dnl The first argument is a Python version related to the 2.x series (if dnl empty, it means that Python 2 is not supported). The second argument dnl is a Python version related to at least the 3.x series (if empty, @@ -13,49 +15,94 @@ dnl it means that Python 3 or later is not supported). dnl dnl INN_PYTHON_CHECK_MODULE -dnl Checks for the existence of a Python module and runs provided code -dnl based on whether or not it was found. +dnl Checks for the existence of a Python module. Runs the second argument +dnl if it is present and the third argument if it is not. dnl dnl INN_LIB_PYTHON dnl Determines the flags required for embedding Python and sets dnl PYTHON_CPPFLAGS and PYTHON_LIBS. dnl -dnl Defines INN_ARG_PYTHON, which sets up the --with-python command line -dnl argument and also sets various flags needed for embedded Python if it is -dnl requested. +dnl INN_PROG_PYTHON should generally be called before the other two macros. +dnl If it isn't, the PYTHON environment variable must be set in some other +dnl way. (It cannot be run automatically via dependencies because it takes a +dnl mandatory minimum version argument, which should be provided by the +dnl calling configure script.) dnl -dnl We use the distutils.sysconfig module shipped with Python 2.2.0 and later -dnl to find the compiler and linker flags to use to embed Python. -dnl We also select libpython in the main library location (a shared library -dnl is present there in Python 2.3.0 and later). +dnl This macro uses the distutils.sysconfig module shipped with Python 2.2.0 +dnl and later to find the compiler and linker flags to use to embed Python. +dnl It also expects libpython to be in the main library location, which it is +dnl since Python 2.3.0. +dnl +dnl The canonical version of this file is maintained in the rra-c-util +dnl package, available at . +dnl +dnl Copyright 2018 Russ Allbery +dnl Copyright 2009, 2011, 2015, 2018 Julien ??LIE +dnl Copyright 1998-2003 The Internet Software Consortium +dnl +dnl Permission to use, copy, modify, and distribute this software for any +dnl purpose with or without fee is hereby granted, provided that the above +dnl copyright notice and this permission notice appear in all copies. +dnl +dnl THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH +dnl REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +dnl MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY +dnl SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +dnl WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +dnl ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +dnl IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +dnl +dnl SPDX-License-Identifier: ISC +dnl Command used to probe the Python version. +AC_DEFUN([_INN_PROG_PYTHON_CMD], [[ +import sys +two_okay = False +three_okay = False +if sys.argv[1]: + two_tuple = tuple(int(i) for i in sys.argv[1].split(".")) + if sys.version_info.major == 2 and sys.version_info >= two_tuple: + two_okay = True +if sys.argv[2]: + three_tuple = tuple(int(i) for i in sys.argv[2].split(".")) + if sys.version_info.major > 2 and sys.version_info >= three_tuple: + three_okay = True +assert(two_okay or three_okay) +]]) + dnl Check for the path to Python and ensure it meets our minimum version -dnl requirement (given as the argument). Honor the $PYTHON environment +dnl requirement. The first argument specifies the minimum Python 2 version +dnl and the second argument specifies the minimum Python 3 (or later) version. +dnl At least one constraint must be met. Honor the $PYTHON environment dnl variable, if set. AC_DEFUN([INN_PROG_PYTHON], [AC_ARG_VAR([PYTHON], [Location of Python interpreter]) - AS_IF([test x"$1" != x], [py_expected_ver="$1 (in the 2.x series)"], - [py_expected_ver=""]) + AS_IF([test x"$1" != x], + [inn_py_expected_ver="$1 (2.x series)"], + [inn_py_expected_ver=""]) AS_IF([test x"$2" != x], - [AS_IF([test x"$1" != x], [py_expected_ver="$py_expected_ver or "]) - py_expected_ver="${py_expected_ver}$2"]) + [AS_IF([test x"$1" != x], + [inn_py_expected_ver="$inn_py_expected_ver or "]) + inn_py_expected_ver="${inn_py_expected_ver}$2"]) AS_IF([test x"$PYTHON" != x], [AS_IF([! test -x "$PYTHON"], [AC_MSG_ERROR([Python binary $PYTHON not found])]) - AS_IF([! "$PYTHON" -c 'import sys; assert((False if "$2" == "" else (sys.version_info.major > 2 and sys.version_info >= tuple(int(i) for i in "$2".split(".")))) if "$1" == "" else ((sys.version_info.major == 2 and sys.version_info >= tuple(int(i) for i in "$1".split("."))) if "$2" == "" else ((sys.version_info.major == 2 and sys.version_info >= tuple(int(i) for i in "$1".split("."))) or sys.version_info >= tuple(int(i) for i in "$2".split(".")))))' >/dev/null 2>&1], - [AC_MSG_ERROR([Python $py_expected_ver or greater is required])])], - [AC_CACHE_CHECK([for Python version $py_expected_ver or later], [ac_cv_path_PYTHON], - [AC_PATH_PROGS_FEATURE_CHECK([PYTHON], [python], - [AS_IF(["$ac_path_PYTHON" -c 'import sys; assert((False if "$2" == "" else (sys.version_info.major > 2 and sys.version_info >= tuple(int(i) for i in "$2".split(".")))) if "$1" == "" else ((sys.version_info.major == 2 and sys.version_info >= tuple(int(i) for i in "$1".split("."))) if "$2" == "" else ((sys.version_info.major == 2 and sys.version_info >= tuple(int(i) for i in "$1".split("."))) or sys.version_info >= tuple(int(i) for i in "$2".split(".")))))' >/dev/null 2>&1], + AS_IF([! "$PYTHON" -c '_INN_PROG_PYTHON_CMD()' '$1' '$2' >/dev/null 2>&1], + [AC_MSG_ERROR([Python $inn_py_expected_ver or greater is required])])], + [AC_CACHE_CHECK([for Python version $inn_py_expected_ver or later], + [ac_cv_path_PYTHON], + [AC_PATH_PROGS_FEATURE_CHECK([PYTHON], [python python3 python2], + [AS_IF(["$ac_path_PYTHON" -c '_INN_PROG_PYTHON_CMD()' \ + '$1' '$2' >/dev/null 2>&1], [ac_cv_path_PYTHON="$ac_path_PYTHON" ac_path_PYTHON_found=:])])]) AS_IF([test x"$ac_cv_path_PYTHON" = x], - [AC_MSG_ERROR([Python $py_expected_ver or greater is required])]) + [AC_MSG_ERROR([Python $inn_py_expected_ver or greater is required])]) PYTHON="$ac_cv_path_PYTHON" AC_SUBST([PYTHON])])]) -dnl Check whether a given Python module can be loaded. Runs the second argument -dnl if it can, and the third argument if it cannot. +dnl Check whether a given Python module can be loaded. Runs the second +dnl argument if it can, and the third argument if it cannot. AC_DEFUN([INN_PYTHON_CHECK_MODULE], [AS_LITERAL_IF([$1], [], [m4_fatal([$0: requires literal arguments])])dnl AS_VAR_PUSHDEF([ac_Module], [inn_cv_python_module_$1])dnl @@ -78,11 +125,21 @@ print(" -L".join(distutils.sysconfig.get_config_vars("LIBDIR")))'` py_ldlibrary=`$PYTHON -c 'import distutils.sysconfig; \ print(distutils.sysconfig.get_config_vars("LDLIBRARY")@<:@0@:>@)'` - py_linkage=`$PYTHON -c 'import distutils.sysconfig; \ - print(" ".join(distutils.sysconfig.get_config_vars("LIBS", \ - "LIBC", "LIBM", "LOCALMODLIBS", "BASEMODLIBS", \ + py_linkage=`$PYTHON -c 'import distutils.sysconfig; \ + print(" ".join(distutils.sysconfig.get_config_vars( \ + "LIBS", "LIBC", "LIBM", "LOCALMODLIBS", "BASEMODLIBS", \ "LINKFORSHARED", "LDFLAGS")))'` py_libpython=`echo $py_ldlibrary | sed "s/^lib//" | sed "s/\.@<:@a-z@:>@*$//"` PYTHON_LIBS="-L$py_libdir -l$py_libpython $py_linkage" PYTHON_LIBS=`echo $PYTHON_LIBS | sed -e 's/[ \\t]*/ /g'` - AC_MSG_RESULT([$PYTHON_LIBS])]) + AC_MSG_RESULT([$PYTHON_LIBS]) + inn_python_save_CPPFLAGS="$CPPFLAGS" + inn_python_save_LIBS="$LIBS" + CPPFLAGS="$PYTHON_CPPFLAGS $CPPFLAGS" + LIBS="$PYTHON_LIBS $LIBS" + AC_CHECK_HEADER([Python.h], [], + [AC_MSG_FAILURE([unable to compile with Python.h])]) + AC_CHECK_FUNC([Py_Initialize], [], + [AC_MSG_FAILURE([unable to link with Python library])]) + CPPFLAGS="$inn_python_save_CPPFLAGS" + LIBS="$inn_python_save_LIBS"]) Modified: support/getrra-c-util =================================================================== --- support/getrra-c-util 2018-12-02 14:26:13 UTC (rev 10306) +++ support/getrra-c-util 2018-12-02 14:31:42 UTC (rev 10307) @@ -244,6 +244,7 @@ download m4/openssl.m4 m4 openssl.m4 download m4/pam-const.m4 m4 pam-const.m4 download m4/perl.m4 m4 perl.m4 +download m4/python.m4 m4 python.m4 download m4/sasl.m4 m4 sasl.m4 download m4/snprintf.m4 m4 snprintf.m4 download m4/socket-unix.m4 m4 socket-unix.m4 From rra at isc.org Sun Dec 2 14:33:59 2018 From: rra at isc.org (INN Commit) Date: Sun, 2 Dec 2018 06:33:59 -0800 (PST) Subject: INN commit: branches/2.6/tests (9 files) Message-ID: <20181202143359.BD3E567D58@hope.eyrie.org> Date: Sunday, December 2, 2018 @ 06:33:59 Author: iulius Revision: 10308 Take into account return values of chdir and system commands Modified: branches/2.6/tests/authprogs/ident-t.c branches/2.6/tests/lib/confparse-t.c branches/2.6/tests/lib/innconf-t.c branches/2.6/tests/lib/wire-t.c branches/2.6/tests/nnrpd/auth-ext-t.c branches/2.6/tests/overview/api-t.c branches/2.6/tests/overview/overview-t.c branches/2.6/tests/overview/xref-t.c branches/2.6/tests/util/innbind-t.c -----------------------+ authprogs/ident-t.c | 13 +++++++++---- lib/confparse-t.c | 19 +++++++++++++------ lib/innconf-t.c | 19 +++++++++++++------ lib/wire-t.c | 19 +++++++++++++------ nnrpd/auth-ext-t.c | 10 +++++++--- overview/api-t.c | 28 +++++++++++++++++++--------- overview/overview-t.c | 25 +++++++++++++++++-------- overview/xref-t.c | 25 +++++++++++++++++-------- util/innbind-t.c | 3 ++- 9 files changed, 110 insertions(+), 51 deletions(-) Modified: authprogs/ident-t.c =================================================================== --- authprogs/ident-t.c 2018-12-02 14:31:42 UTC (rev 10307) +++ authprogs/ident-t.c 2018-12-02 14:33:59 UTC (rev 10308) @@ -26,7 +26,8 @@ fd = network_connect_host(host, 11119, NULL, DEFAULT_TIMEOUT); if (fd < 0) _exit(1); - read(fd, buffer, sizeof(buffer)); + if (read(fd, buffer, sizeof(buffer)) < 0) + sysbail("cannot read"); close(fd); } @@ -135,9 +136,13 @@ int main(void) { - if (access("ident.t", F_OK) < 0) - if (access("authprogs/ident.t", F_OK) == 0) - chdir("authprogs"); + if (access("ident.t", F_OK) < 0) { + if (access("authprogs/ident.t", F_OK) == 0) { + if (chdir("authprogs") < 0) { + sysbail("cannot chdir to authprogs"); + } + } + } test_init(4); server_ipv4(1); Modified: lib/confparse-t.c =================================================================== --- lib/confparse-t.c 2018-12-02 14:31:42 UTC (rev 10307) +++ lib/confparse-t.c 2018-12-02 14:33:59 UTC (rev 10308) @@ -362,12 +362,19 @@ test_init(373); - if (access("../data/config/valid", F_OK) == 0) - chdir("../data"); - else if (access("data/config/valid", F_OK) == 0) - chdir("data"); - else if (access("tests/data/config/valid", F_OK) == 0) - chdir("tests/data"); + if (access("../data/config/valid", F_OK) == 0) { + if (chdir("../data") < 0) { + sysbail("cannot chdir to ../data"); + } + } else if (access("data/config/valid", F_OK) == 0) { + if (chdir("data") < 0) { + sysbail("cannot chdir to data"); + } + } else if (access("tests/data/config/valid", F_OK) == 0) { + if (chdir("tests/data") < 0) { + sysbail("cannot chdir to tests/data"); + } + } group = config_parse_file("config/valid"); ok(1, group != NULL); if (group == NULL) Modified: lib/innconf-t.c =================================================================== --- lib/innconf-t.c 2018-12-02 14:31:42 UTC (rev 10307) +++ lib/innconf-t.c 2018-12-02 14:33:59 UTC (rev 10308) @@ -26,12 +26,19 @@ struct innconf *standard; FILE *config; - if (access("../data/config/valid", F_OK) == 0) - chdir("../data"); - else if (access("data/config/valid", F_OK) == 0) - chdir("data"); - else if (access("tests/data/config/valid", F_OK) == 0) - chdir("tests/data"); + if (access("../data/config/valid", F_OK) == 0) { + if (chdir("../data") < 0) { + sysbail("cannot chdir to ../data"); + } + } else if (access("data/config/valid", F_OK) == 0) { + if (chdir("data") < 0) { + sysbail("cannot chdir to data"); + } + } else if (access("tests/data/config/valid", F_OK) == 0) { + if (chdir("tests/data") < 0) { + sysbail("cannot chdir to tests/data"); + } + } test_init(9); Modified: lib/wire-t.c =================================================================== --- lib/wire-t.c 2018-12-02 14:31:42 UTC (rev 10307) +++ lib/wire-t.c 2018-12-02 14:33:59 UTC (rev 10308) @@ -60,12 +60,19 @@ ok(9, wire_findbody(p, 1) == NULL); ok(10, wire_findbody(p, 0) == NULL); - if (access("../data/articles/wire-strange", F_OK) == 0) - chdir("../data"); - else if (access("data/articles/wire-strange", F_OK) == 0) - chdir("data"); - else if (access("tests/data/articles/wire-strange", F_OK) == 0) - chdir("tests/data"); + if (access("../data/articles/wire-strange", F_OK) == 0) { + if (chdir("../data") < 0) { + sysbail("cannot chdir to ../data"); + } + } else if (access("data/articles/wire-strange", F_OK) == 0) { + if (chdir("data") < 0) { + sysbail("cannot chdir to data"); + } + } else if (access("tests/data/articles/wire-strange", F_OK) == 0) { + if (chdir("tests/data") < 0) { + sysbail("cannot chdir to tests/data"); + } + } article = read_file("articles/wire-strange", &st); p = wire_findbody(article, st.st_size); Modified: nnrpd/auth-ext-t.c =================================================================== --- nnrpd/auth-ext-t.c 2018-12-02 14:31:42 UTC (rev 10307) +++ nnrpd/auth-ext-t.c 2018-12-02 14:33:59 UTC (rev 10308) @@ -108,9 +108,13 @@ struct client *client; int n = 1; - if (access("auth-test", F_OK) < 0) - if (access("nnrpd/auth-test", F_OK) == 0) - chdir("nnrpd"); + if (access("auth-test", F_OK) < 0) { + if (access("nnrpd/auth-test", F_OK) == 0) { + if (chdir("nnrpd") < 0) { + sysbail("cannot chdir to nnrpd"); + } + } + } client = client_new(); test_init(11 * 6); Modified: overview/api-t.c =================================================================== --- overview/api-t.c 2018-12-02 14:31:42 UTC (rev 10307) +++ overview/api-t.c 2018-12-02 14:33:59 UTC (rev 10308) @@ -109,7 +109,8 @@ static struct overview * overview_init(void) { - system("/bin/rm -rf ov-tmp"); + if (system("/bin/rm -rf ov-tmp") < 0) + sysdie("Cannot rm ov-tmp"); if (mkdir("ov-tmp", 0755)) sysdie("Cannot mkdir ov-tmp"); if (strcmp(innconf->ovmethod, "buffindexed") == 0) @@ -583,7 +584,8 @@ ok(n++, overview_verify_data("overview/bogus", overview)); hash_free(groups); overview_close(overview); - system("/bin/rm -rf ov-tmp"); + if (system("/bin/rm -rf ov-tmp") < 0) + sysdie("Cannot rm ov-tmp"); ok(n++, true); return n; } @@ -679,7 +681,8 @@ ok(n++, overview_verify_data("overview/bogus", overview)); hash_free(groups); overview_close(overview); - system("/bin/rm -rf ov-tmp"); + if (system("/bin/rm -rf ov-tmp") < 0) + sysdie("Cannot rm ov-tmp"); ok(n++, true); return n; } @@ -689,12 +692,19 @@ { int n = 1; - if (access("../data/overview/basic", F_OK) == 0) - chdir("../data"); - else if (access("data/overview/basic", F_OK) == 0) - chdir("data"); - else if (access("tests/data/overview/basic", F_OK) == 0) - chdir("tests/data"); + if (access("../data/overview/basic", F_OK) == 0) { + if (chdir("../data") < 0) { + sysbail("cannot chdir to ../data"); + } + } else if (access("data/overview/basic", F_OK) == 0) { + if (chdir("data") < 0) { + sysbail("cannot chdir to data"); + } + } else if (access("tests/data/overview/basic", F_OK) == 0) { + if (chdir("tests/data") < 0) { + sysbail("cannot chdir to tests/data"); + } + } /* Cancels can't be tested with mmap, so there are only 21 tests there. */ test_init(27 * 2 + 21); Modified: overview/overview-t.c =================================================================== --- overview/overview-t.c 2018-12-02 14:31:42 UTC (rev 10307) +++ overview/overview-t.c 2018-12-02 14:33:59 UTC (rev 10308) @@ -123,7 +123,8 @@ static bool overview_init(void) { - system("/bin/rm -rf ov-tmp"); + if (system("/bin/rm -rf ov-tmp") < 0) + sysdie("Cannot rm ov-tmp"); if (mkdir("ov-tmp", 0755)) sysdie("Cannot mkdir ov-tmp"); if (strcmp(innconf->ovmethod, "buffindexed") == 0) @@ -503,12 +504,19 @@ test_init(21); - if (access("../data/overview/basic", F_OK) == 0) - chdir("../data"); - else if (access("data/overview/basic", F_OK) == 0) - chdir("data"); - else if (access("tests/data/overview/basic", F_OK) == 0) - chdir("tests/data"); + if (access("../data/overview/basic", F_OK) == 0) { + if (chdir("../data") < 0) { + sysbail("cannot chdir to ../data"); + } + } else if (access("data/overview/basic", F_OK) == 0) { + if (chdir("data") < 0) { + sysbail("cannot chdir to data"); + } + } else if (access("tests/data/overview/basic", F_OK) == 0) { + if (chdir("tests/data") < 0) { + sysbail("cannot chdir to tests/data"); + } + } fake_innconf(); if (!overview_init()) @@ -562,7 +570,8 @@ ok(20, overview_verify_data("overview/bogus")); hash_free(groups); OVclose(); - system("/bin/rm -rf ov-tmp"); + if (system("/bin/rm -rf ov-tmp") <0) + sysdie("Cannot rm ov-tmp"); ok(21, true); return 0; Modified: overview/xref-t.c =================================================================== --- overview/xref-t.c 2018-12-02 14:31:42 UTC (rev 10307) +++ overview/xref-t.c 2018-12-02 14:33:59 UTC (rev 10308) @@ -49,7 +49,8 @@ static struct overview * overview_init(void) { - system("/bin/rm -rf ov-tmp spool"); + if (system("/bin/rm -rf ov-tmp spool") < 0) + sysdie("Cannot rm ov-tmp spool"); if (mkdir("ov-tmp", 0755)) sysdie("Cannot mkdir ov-tmp"); if (mkdir("spool", 0755)) @@ -188,12 +189,19 @@ ARTHANDLE handle = ARTHANDLE_INITIALIZER; TOKEN token; - if (access("../data/overview/xref", F_OK) == 0) - chdir("../data"); - else if (access("data/overview/xref", F_OK) == 0) - chdir("data"); - else if (access("tests/data/overview/xref", F_OK) == 0) - chdir("tests/data"); + if (access("../data/overview/xref", F_OK) == 0) { + if (chdir("../data") < 0) { + sysbail("cannot chdir to ../data"); + } + } else if (access("data/overview/xref", F_OK) == 0) { + if (chdir("data") < 0) { + sysbail("cannot chdir to data"); + } + } else if (access("tests/data/overview/xref", F_OK) == 0) { + if (chdir("tests/data") < 0) { + sysbail("cannot chdir to tests/data"); + } + } /* 7 group/article pairs plus one check for each insert plus the final check for the count. */ @@ -244,6 +252,7 @@ ok(n++, !overview_token(overview, "example.test3", 2, &token)); ok(n++, overview_token(overview, "example.test3", 3, &token)); - system("/bin/rm -rf ov-tmp spool"); + if (system("/bin/rm -rf ov-tmp spool") < 0) + sysdie("Cannot rm ov-tmp spool"); return 0; } Modified: util/innbind-t.c =================================================================== --- util/innbind-t.c 2018-12-02 14:31:42 UTC (rev 10307) +++ util/innbind-t.c 2018-12-02 14:33:59 UTC (rev 10308) @@ -317,7 +317,8 @@ if (access("innbind.t", F_OK) < 0) if (access("util/innbind.t", F_OK) == 0) - chdir("util"); + if (chdir("util") < 0) + sysbail("cannot chdir to util"); test_init(15); From rra at isc.org Sun Dec 2 14:35:11 2018 From: rra at isc.org (INN Commit) Date: Sun, 2 Dec 2018 06:35:11 -0800 (PST) Subject: INN commit: branches/2.6/nnrpd (tls.c tls.h) Message-ID: <20181202143511.55F8167D58@hope.eyrie.org> Date: Sunday, December 2, 2018 @ 06:35:10 Author: iulius Revision: 10309 Update comments of TLS implementation (it is not v1 only) Modified: branches/2.6/nnrpd/tls.c branches/2.6/nnrpd/tls.h -------+ tls.c | 9 +-------- tls.h | 9 +-------- 2 files changed, 2 insertions(+), 16 deletions(-) Modified: tls.c =================================================================== --- tls.c 2018-12-02 14:33:59 UTC (rev 10308) +++ tls.c 2018-12-02 14:35:10 UTC (rev 10309) @@ -1,17 +1,10 @@ /* $Id$ ** -** tls.c -- TLSv1 functions. +** tls.c -- TLS functions. ** Copyright (C) 2000 Kenichi Okada . ** ** Author: Kenichi Okada ** Created: 2000-02-22 -** -** [RFC 2246] "The TLS Protocol Version 1.0" -** by Christopher Allen and -** Tim Dierks (1999/01) -** -** [RFC 2595] "Using TLS with IMAP, POP3 and ACAP" -** by Chris Newman (1999/06) */ #include "config.h" Modified: tls.h =================================================================== --- tls.h 2018-12-02 14:33:59 UTC (rev 10308) +++ tls.h 2018-12-02 14:35:10 UTC (rev 10309) @@ -1,17 +1,10 @@ /* $Id$ ** -** tls.h -- TLSv1 functions. +** tls.h -- TLS functions. ** Copyright (C) 2000 Kenichi Okada . ** ** Author: Kenichi Okada ** Created: 2000-02-22 -** -** [RFC 2246] "The TLS Protocol Version 1.0" -** by Christopher Allen and -** Tim Dierks (1999/01) -** -** [RFC 2595] "Using TLS with IMAP, POP3 and ACAP" -** by Chris Newman (1999/06) */ #ifdef HAVE_OPENSSL From rra at isc.org Mon Dec 17 08:03:23 2018 From: rra at isc.org (INN Commit) Date: Mon, 17 Dec 2018 00:03:23 -0800 (PST) Subject: INN commit: trunk (6 files) Message-ID: <20181217080323.7A82A67D5D@hope.eyrie.org> Date: Monday, December 17, 2018 @ 00:03:22 Author: iulius Revision: 10310 Update to latest C TAP Harness upstream version Modified: trunk/support/getc-tap-harness trunk/tests/docs/pod.t trunk/tests/lib/network/server-t.c trunk/tests/runtests.c trunk/tests/tap/basic.c trunk/tests/tap/basic.h ------------------------------+ support/getc-tap-harness | 4 +-- tests/docs/pod.t | 16 +++++++++++++- tests/lib/network/server-t.c | 11 ++++++---- tests/runtests.c | 2 - tests/tap/basic.c | 44 ++++++++++++++++++++++++++++++++--------- tests/tap/basic.h | 12 ++++++++++- 6 files changed, 69 insertions(+), 20 deletions(-) Modified: support/getc-tap-harness =================================================================== --- support/getc-tap-harness 2018-12-02 14:35:10 UTC (rev 10309) +++ support/getc-tap-harness 2018-12-17 08:03:22 UTC (rev 10310) @@ -133,9 +133,9 @@ }\\ #endif\\ " \ - -e "152 i \\ + -e "154 i \\ #ifndef INN_LIBINN_H" \ - -e "186 i \\ + -e "188 i \\ #endif" \ -e 's/^ok.int /new_ok(int /g' \ -e 's/^skip.const /new_skip(const /g' \ Modified: tests/docs/pod.t =================================================================== --- tests/docs/pod.t 2018-12-02 14:35:10 UTC (rev 10309) +++ tests/docs/pod.t 2018-12-17 08:03:22 UTC (rev 10310) @@ -36,8 +36,20 @@ use warnings; use File::Spec; -use Test::More; +# Red Hat's base perl package doesn't include Test::More (one has to install +# the perl-core package in addition). Try to detect this and skip any Perl +# tests if Test::More is not present. +eval { + require Test::More; + Test::More->import(); +}; +if ($@) { + print "1..0 # SKIP Test::More required for test\n" + or croak('Cannot write to stdout'); + exit 0; +} + # Abort if C_TAP_SOURCE isn't set. if (!$ENV{C_TAP_SOURCE}) { BAIL_OUT('C_TAP_SOURCE environment variable not set'); @@ -45,7 +57,7 @@ # Load the Test::Pod module. if (!eval { require Test::Pod }) { - plan skip_all => 'Test::Pod required for testing POD'; + plan(skip_all => 'Test::Pod required for testing POD'); } Test::Pod->import; Modified: tests/lib/network/server-t.c =================================================================== --- tests/lib/network/server-t.c 2018-12-02 14:35:10 UTC (rev 10309) +++ tests/lib/network/server-t.c 2018-12-17 08:03:22 UTC (rev 10310) @@ -391,7 +391,7 @@ unsigned int count, i; pid_t child; struct sockaddr *saddr; - int status; + int status, family; /* Bind sockets for all available local addresses. */ if (!network_bind_all(SOCK_STREAM, 11119, &fds, &count)) @@ -415,6 +415,8 @@ /* Get the socket type to determine what type of client to run. */ saddr = get_sockaddr(fd); + family = saddr->sa_family; + free(saddr); /* * Fork off a child writer and test the server accept. If IPV6_V6ONLY @@ -425,16 +427,18 @@ if (child < 0) sysbail("cannot fork"); else if (child == 0) { - if (saddr->sa_family == AF_INET) { + if (family == AF_INET) { client_writer("::1", source_ipv6, false); client_writer("127.0.0.1", source_ipv4, true); #ifdef HAVE_INET6 - } else if (saddr->sa_family == AF_INET6) { + } else if (family == AF_INET6) { # ifdef IPV6_V6ONLY client_writer("127.0.0.1", source_ipv4, false); # endif client_writer("::1", source_ipv6, true); #endif + } else { + die("unknown socket family %d", family); } } else { test_server_accept(fd); @@ -441,7 +445,6 @@ waitpid(child, &status, 0); is_int(0, status, "client made correct connections"); } - free(saddr); } network_bind_all_free(fds); Modified: tests/runtests.c =================================================================== --- tests/runtests.c 2018-12-02 14:35:10 UTC (rev 10309) +++ tests/runtests.c 2018-12-17 08:03:22 UTC (rev 10310) @@ -1322,11 +1322,9 @@ end = skip_non_whitespace(p); if (strncmp(p, "libtool", end - p) == 0) { use_libtool = 1; - p = end; } else if (strncmp(p, "valgrind", end - p) == 0) { valgrind = getenv("C_TAP_VALGRIND"); use_valgrind = (valgrind != NULL); - p = end; } else { option = xstrndup(p, end - p); die("unknown test list option %s", option); Modified: tests/tap/basic.c =================================================================== --- tests/tap/basic.c 2018-12-02 14:35:10 UTC (rev 10309) +++ tests/tap/basic.c 2018-12-17 08:03:22 UTC (rev 10310) @@ -161,6 +161,8 @@ */ struct cleanup_func { test_cleanup_func func; + test_cleanup_func_with_data func_with_data; + void *data; struct cleanup_func *next; }; static struct cleanup_func *cleanup_funcs = NULL; @@ -367,7 +369,13 @@ */ primary = (_process == 0 || getpid() == _process); while (cleanup_funcs != NULL) { - cleanup_funcs->func(success, primary); + if (cleanup_funcs->func_with_data) { + void *data = cleanup_funcs->data; + + cleanup_funcs->func_with_data(success, primary, data); + } else { + cleanup_funcs->func(success, primary); + } current = cleanup_funcs; cleanup_funcs = cleanup_funcs->next; free(current); @@ -939,7 +947,7 @@ ; length = (size_t) (p - s); copy = malloc(length + 1); - if (p == NULL) + if (copy == NULL) sysbail("failed to strndup %lu bytes", (unsigned long) length); memcpy(copy, s, length); copy[length] = '\0'; @@ -1027,18 +1035,16 @@ free(path); } - -/* - * Register a cleanup function that is called when testing ends. All such - * registered functions will be run by finish. - */ -void -test_cleanup_register(test_cleanup_func func) +static void +register_cleanup(test_cleanup_func func, + test_cleanup_func_with_data func_with_data, void *data) { struct cleanup_func *cleanup, **last; cleanup = bmalloc(sizeof(struct cleanup_func)); cleanup->func = func; + cleanup->func_with_data = func_with_data; + cleanup->data = data; cleanup->next = NULL; last = &cleanup_funcs; while (*last != NULL) @@ -1045,3 +1051,23 @@ last = &(*last)->next; *last = cleanup; } + +/* + * Register a cleanup function that is called when testing ends. All such + * registered functions will be run by finish. + */ +void +test_cleanup_register(test_cleanup_func func) +{ + register_cleanup(func, NULL, NULL); +} + +/* + * Same as above, but also allows an opaque pointer to be passed to the cleanup + * function. + */ +void +test_cleanup_register_with_data(test_cleanup_func_with_data func, void *data) +{ + register_cleanup(NULL, func, data); +} Modified: tests/tap/basic.h =================================================================== --- tests/tap/basic.h 2018-12-02 14:35:10 UTC (rev 10309) +++ tests/tap/basic.h 2018-12-17 08:03:22 UTC (rev 10310) @@ -195,11 +195,21 @@ * The function must return void and will be passed two arguments: an int that * will be true if the test completed successfully and false otherwise, and an * int that will be true if the cleanup function is run in the primary process - * (the one that called plan or plan_lazy) and false otherwise. + * (the one that called plan or plan_lazy) and false otherwise. If + * test_cleanup_register_with_data is used instead, a generic pointer can be + * provided and will be passed to the cleanup function as a third argument. + * + * test_cleanup_register_with_data is the better API and should have been the + * only API. test_cleanup_register was an API error preserved for backward + * cmpatibility. */ typedef void (*test_cleanup_func)(int, int); +typedef void (*test_cleanup_func_with_data)(int, int, void *); + void test_cleanup_register(test_cleanup_func) __attribute__((__nonnull__)); +void test_cleanup_register_with_data(test_cleanup_func_with_data, void *) + __attribute__((__nonnull__)); END_DECLS From rra at isc.org Mon Dec 17 08:04:07 2018 From: rra at isc.org (INN Commit) Date: Mon, 17 Dec 2018 00:04:07 -0800 (PST) Subject: INN commit: branches/2.6 (6 files) Message-ID: <20181217080407.6A01E67D5D@hope.eyrie.org> Date: Monday, December 17, 2018 @ 00:04:06 Author: iulius Revision: 10311 Update to latest C TAP Harness upstream version Modified: branches/2.6/support/getc-tap-harness branches/2.6/tests/docs/pod.t branches/2.6/tests/lib/network/server-t.c branches/2.6/tests/runtests.c branches/2.6/tests/tap/basic.c branches/2.6/tests/tap/basic.h ------------------------------+ support/getc-tap-harness | 4 +-- tests/docs/pod.t | 16 +++++++++++++- tests/lib/network/server-t.c | 11 ++++++---- tests/runtests.c | 2 - tests/tap/basic.c | 44 ++++++++++++++++++++++++++++++++--------- tests/tap/basic.h | 12 ++++++++++- 6 files changed, 69 insertions(+), 20 deletions(-) Modified: support/getc-tap-harness =================================================================== --- support/getc-tap-harness 2018-12-17 08:03:22 UTC (rev 10310) +++ support/getc-tap-harness 2018-12-17 08:04:06 UTC (rev 10311) @@ -133,9 +133,9 @@ }\\ #endif\\ " \ - -e "152 i \\ + -e "154 i \\ #ifndef INN_LIBINN_H" \ - -e "186 i \\ + -e "188 i \\ #endif" \ -e 's/^ok.int /new_ok(int /g' \ -e 's/^skip.const /new_skip(const /g' \ Modified: tests/docs/pod.t =================================================================== --- tests/docs/pod.t 2018-12-17 08:03:22 UTC (rev 10310) +++ tests/docs/pod.t 2018-12-17 08:04:06 UTC (rev 10311) @@ -36,8 +36,20 @@ use warnings; use File::Spec; -use Test::More; +# Red Hat's base perl package doesn't include Test::More (one has to install +# the perl-core package in addition). Try to detect this and skip any Perl +# tests if Test::More is not present. +eval { + require Test::More; + Test::More->import(); +}; +if ($@) { + print "1..0 # SKIP Test::More required for test\n" + or croak('Cannot write to stdout'); + exit 0; +} + # Abort if C_TAP_SOURCE isn't set. if (!$ENV{C_TAP_SOURCE}) { BAIL_OUT('C_TAP_SOURCE environment variable not set'); @@ -45,7 +57,7 @@ # Load the Test::Pod module. if (!eval { require Test::Pod }) { - plan skip_all => 'Test::Pod required for testing POD'; + plan(skip_all => 'Test::Pod required for testing POD'); } Test::Pod->import; Modified: tests/lib/network/server-t.c =================================================================== --- tests/lib/network/server-t.c 2018-12-17 08:03:22 UTC (rev 10310) +++ tests/lib/network/server-t.c 2018-12-17 08:04:06 UTC (rev 10311) @@ -391,7 +391,7 @@ unsigned int count, i; pid_t child; struct sockaddr *saddr; - int status; + int status, family; /* Bind sockets for all available local addresses. */ if (!network_bind_all(SOCK_STREAM, 11119, &fds, &count)) @@ -415,6 +415,8 @@ /* Get the socket type to determine what type of client to run. */ saddr = get_sockaddr(fd); + family = saddr->sa_family; + free(saddr); /* * Fork off a child writer and test the server accept. If IPV6_V6ONLY @@ -425,16 +427,18 @@ if (child < 0) sysbail("cannot fork"); else if (child == 0) { - if (saddr->sa_family == AF_INET) { + if (family == AF_INET) { client_writer("::1", source_ipv6, false); client_writer("127.0.0.1", source_ipv4, true); #ifdef HAVE_INET6 - } else if (saddr->sa_family == AF_INET6) { + } else if (family == AF_INET6) { # ifdef IPV6_V6ONLY client_writer("127.0.0.1", source_ipv4, false); # endif client_writer("::1", source_ipv6, true); #endif + } else { + die("unknown socket family %d", family); } } else { test_server_accept(fd); @@ -441,7 +445,6 @@ waitpid(child, &status, 0); is_int(0, status, "client made correct connections"); } - free(saddr); } network_bind_all_free(fds); Modified: tests/runtests.c =================================================================== --- tests/runtests.c 2018-12-17 08:03:22 UTC (rev 10310) +++ tests/runtests.c 2018-12-17 08:04:06 UTC (rev 10311) @@ -1322,11 +1322,9 @@ end = skip_non_whitespace(p); if (strncmp(p, "libtool", end - p) == 0) { use_libtool = 1; - p = end; } else if (strncmp(p, "valgrind", end - p) == 0) { valgrind = getenv("C_TAP_VALGRIND"); use_valgrind = (valgrind != NULL); - p = end; } else { option = xstrndup(p, end - p); die("unknown test list option %s", option); Modified: tests/tap/basic.c =================================================================== --- tests/tap/basic.c 2018-12-17 08:03:22 UTC (rev 10310) +++ tests/tap/basic.c 2018-12-17 08:04:06 UTC (rev 10311) @@ -161,6 +161,8 @@ */ struct cleanup_func { test_cleanup_func func; + test_cleanup_func_with_data func_with_data; + void *data; struct cleanup_func *next; }; static struct cleanup_func *cleanup_funcs = NULL; @@ -367,7 +369,13 @@ */ primary = (_process == 0 || getpid() == _process); while (cleanup_funcs != NULL) { - cleanup_funcs->func(success, primary); + if (cleanup_funcs->func_with_data) { + void *data = cleanup_funcs->data; + + cleanup_funcs->func_with_data(success, primary, data); + } else { + cleanup_funcs->func(success, primary); + } current = cleanup_funcs; cleanup_funcs = cleanup_funcs->next; free(current); @@ -939,7 +947,7 @@ ; length = (size_t) (p - s); copy = malloc(length + 1); - if (p == NULL) + if (copy == NULL) sysbail("failed to strndup %lu bytes", (unsigned long) length); memcpy(copy, s, length); copy[length] = '\0'; @@ -1027,18 +1035,16 @@ free(path); } - -/* - * Register a cleanup function that is called when testing ends. All such - * registered functions will be run by finish. - */ -void -test_cleanup_register(test_cleanup_func func) +static void +register_cleanup(test_cleanup_func func, + test_cleanup_func_with_data func_with_data, void *data) { struct cleanup_func *cleanup, **last; cleanup = bmalloc(sizeof(struct cleanup_func)); cleanup->func = func; + cleanup->func_with_data = func_with_data; + cleanup->data = data; cleanup->next = NULL; last = &cleanup_funcs; while (*last != NULL) @@ -1045,3 +1051,23 @@ last = &(*last)->next; *last = cleanup; } + +/* + * Register a cleanup function that is called when testing ends. All such + * registered functions will be run by finish. + */ +void +test_cleanup_register(test_cleanup_func func) +{ + register_cleanup(func, NULL, NULL); +} + +/* + * Same as above, but also allows an opaque pointer to be passed to the cleanup + * function. + */ +void +test_cleanup_register_with_data(test_cleanup_func_with_data func, void *data) +{ + register_cleanup(NULL, func, data); +} Modified: tests/tap/basic.h =================================================================== --- tests/tap/basic.h 2018-12-17 08:03:22 UTC (rev 10310) +++ tests/tap/basic.h 2018-12-17 08:04:06 UTC (rev 10311) @@ -195,11 +195,21 @@ * The function must return void and will be passed two arguments: an int that * will be true if the test completed successfully and false otherwise, and an * int that will be true if the cleanup function is run in the primary process - * (the one that called plan or plan_lazy) and false otherwise. + * (the one that called plan or plan_lazy) and false otherwise. If + * test_cleanup_register_with_data is used instead, a generic pointer can be + * provided and will be passed to the cleanup function as a third argument. + * + * test_cleanup_register_with_data is the better API and should have been the + * only API. test_cleanup_register was an API error preserved for backward + * cmpatibility. */ typedef void (*test_cleanup_func)(int, int); +typedef void (*test_cleanup_func_with_data)(int, int, void *); + void test_cleanup_register(test_cleanup_func) __attribute__((__nonnull__)); +void test_cleanup_register_with_data(test_cleanup_func_with_data, void *) + __attribute__((__nonnull__)); END_DECLS From rra at isc.org Mon Dec 17 08:45:24 2018 From: rra at isc.org (INN Commit) Date: Mon, 17 Dec 2018 00:45:24 -0800 (PST) Subject: INN commit: trunk/nnrpd (python.c) Message-ID: <20181217084524.878A667D5D@hope.eyrie.org> Date: Monday, December 17, 2018 @ 00:45:23 Author: iulius Revision: 10312 Fix a const discarding when assigning a variable Python 3.7 changed the return value of PyUnicode_AsUTF8 from char to const char. Modified: trunk/nnrpd/python.c ----------+ python.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) Modified: python.c =================================================================== --- python.c 2018-12-17 08:04:06 UTC (rev 10311) +++ python.c 2018-12-17 08:45:23 UTC (rev 10312) @@ -138,7 +138,7 @@ PyObject *result, *item, *proc; int authnum; int i; - char *temp; + const char *temp; PY_load_python(); proc = PY_setup(PYTHONauthen, PYTHONmain, file); @@ -413,7 +413,8 @@ PY_dynamic(char *User, char *NewsGroup, int PostFlag, char **reply_message) { PyObject *result, *proc; - char *string, *temp; + char *string; + const char *temp; int authnum; int i; From rra at isc.org Mon Dec 17 08:46:21 2018 From: rra at isc.org (INN Commit) Date: Mon, 17 Dec 2018 00:46:21 -0800 (PST) Subject: INN commit: branches/2.6/nnrpd (python.c) Message-ID: <20181217084621.267BF67D5D@hope.eyrie.org> Date: Monday, December 17, 2018 @ 00:46:18 Author: iulius Revision: 10313 Fix a const discarding when assigning a variable Python 3.7 changed the return value of PyUnicode_AsUTF8 from char to const char. Modified: branches/2.6/nnrpd/python.c ----------+ python.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) Modified: python.c =================================================================== --- python.c 2018-12-17 08:45:23 UTC (rev 10312) +++ python.c 2018-12-17 08:46:18 UTC (rev 10313) @@ -138,7 +138,7 @@ PyObject *result, *item, *proc; int authnum; int i; - char *temp; + const char *temp; PY_load_python(); proc = PY_setup(PYTHONauthen, PYTHONmain, file); @@ -413,7 +413,8 @@ PY_dynamic(char *User, char *NewsGroup, int PostFlag, char **reply_message) { PyObject *result, *proc; - char *string, *temp; + char *string; + const char *temp; int authnum; int i; From rra at isc.org Mon Dec 17 14:40:50 2018 From: rra at isc.org (INN Commit) Date: Mon, 17 Dec 2018 06:40:50 -0800 (PST) Subject: INN commit: trunk (history/Makefile lib/Makefile storage/Makefile) Message-ID: <20181217144050.578C367D59@hope.eyrie.org> Date: Monday, December 17, 2018 @ 06:40:49 Author: iulius Revision: 10314 Bump version information for our libraries released with INN 2.6.3 A few interfaces have changed in libinn (fqdn function, and new innconf parameter). Modified: trunk/history/Makefile trunk/lib/Makefile trunk/storage/Makefile ------------------+ history/Makefile | 2 +- lib/Makefile | 2 +- storage/Makefile | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) Modified: history/Makefile =================================================================== --- history/Makefile 2018-12-17 08:46:18 UTC (rev 10313) +++ history/Makefile 2018-12-17 14:40:49 UTC (rev 10314) @@ -8,7 +8,7 @@ # recover from make update. We can't use .OLD extensions for the shared # library since ldconfig will think .OLD sorts after the regular library and # will point the binaries at the old library. -LTVERSION = 3:2:0 +LTVERSION = 3:3:0 top = .. CFLAGS = $(GCFLAGS) -I. Modified: lib/Makefile =================================================================== --- lib/Makefile 2018-12-17 08:46:18 UTC (rev 10313) +++ lib/Makefile 2018-12-17 14:40:49 UTC (rev 10314) @@ -8,7 +8,7 @@ # recover from make update. We can't use .OLD extensions for the shared # library since ldconfig will think .OLD sorts after the regular library and # will point the binaries at the old library. -LTVERSION = 5:0:0 +LTVERSION = 6:0:0 top = .. CFLAGS = $(GCFLAGS) Modified: storage/Makefile =================================================================== --- storage/Makefile 2018-12-17 08:46:18 UTC (rev 10313) +++ storage/Makefile 2018-12-17 14:40:49 UTC (rev 10314) @@ -8,7 +8,7 @@ # recover from make update. We can't use .OLD extensions for the shared # library since ldconfig will think .OLD sorts after the regular library and # will point the binaries at the old library. -LTVERSION = 3:2:0 +LTVERSION = 3:3:0 top = .. CFLAGS = $(GCFLAGS) -I. $(BDB_CPPFLAGS) From rra at isc.org Mon Dec 17 14:50:19 2018 From: rra at isc.org (INN Commit) Date: Mon, 17 Dec 2018 06:50:19 -0800 (PST) Subject: INN commit: trunk/control (pgpverify.in) Message-ID: <20181217145019.4790667D59@hope.eyrie.org> Date: Monday, December 17, 2018 @ 06:50:18 Author: iulius Revision: 10315 Update to latest pgpverify 1.30 The previous INN release was done before the official release of pgpverify 1.30; that's why a few comments differed. Modified: trunk/control/pgpverify.in --------------+ pgpverify.in | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) Modified: pgpverify.in =================================================================== --- pgpverify.in 2018-12-17 14:40:49 UTC (rev 10314) +++ pgpverify.in 2018-12-17 14:50:18 UTC (rev 10315) @@ -17,9 +17,9 @@ # practice. # # Changes from 1.29 -> 1.30 -# -- Support for GnuPG's gpg binary (in addition to gpgv). Indeed, gpg -# still validates signatures made with weak digest algorithms like MD5 -# whereas current versions of gpgv no longer do. +# -- Support for GnuPG's gpg binary (in addition to gpgv). gpg (from +# GnuPG 1.x) still validates signatures made with weak digest +# algorithms like MD5 whereas current versions of gpgv no longer do. # # Changes from 1.28 -> 1.29 # -- Disambiguate numbered lists from description lists in POD to silent @@ -137,7 +137,9 @@ # Path to the GnuPG gpg binary, if you have GnuPG and don't want to use # gpgv. This will be used in preference to gpgv and PGP. If you have INN # and the script is able to successfully include your INN::Config module, -# the value of $INN::Config::gpg will override this. +# the value of $INN::Config::gpg will override this. On a recent Debian +# variant, use /usr/bin/gpg1 (from the gnupg1 package) if you want to +# support old signatures with MD5 digest algorithms. # $gpg = '/usr/local/bin/gpg'; # Path to the GnuPG gpgv binary, if you have GnuPG. If you do, this will From rra at isc.org Mon Dec 17 14:51:06 2018 From: rra at isc.org (INN Commit) Date: Mon, 17 Dec 2018 06:51:06 -0800 (PST) Subject: INN commit: trunk/support (config.guess config.sub) Message-ID: <20181217145106.5D36C67D59@hope.eyrie.org> Date: Monday, December 17, 2018 @ 06:51:05 Author: iulius Revision: 10316 Update to latest upstream config.guess and config.sub files Modified: trunk/support/config.guess trunk/support/config.sub --------------+ config.guess | 133 +-- config.sub | 2457 ++++++++++++++++++++++++++++----------------------------- 2 files changed, 1300 insertions(+), 1290 deletions(-) Modified: config.guess =================================================================== --- config.guess 2018-12-17 14:50:18 UTC (rev 10315) +++ config.guess 2018-12-17 14:51:05 UTC (rev 10316) @@ -2,7 +2,7 @@ # Attempt to guess a canonical system name. # Copyright 1992-2018 Free Software Foundation, Inc. -timestamp='2018-01-16' +timestamp='2018-12-07' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by @@ -84,8 +84,6 @@ exit 1 fi -trap 'exit 1' 1 2 15 - # CC_FOR_BUILD -- compiler used by this script. Note that the use of a # compiler to aid in system detection is discouraged as it requires # temporary files to be created and, as you can see below, it is a @@ -96,34 +94,38 @@ # Portable tmp directory creation inspired by the Autoconf team. -set_cc_for_build=' -trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; -trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; -: ${TMPDIR=/tmp} ; - { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || - { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || - { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || - { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; -dummy=$tmp/dummy ; -tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; -case $CC_FOR_BUILD,$HOST_CC,$CC in - ,,) echo "int x;" > "$dummy.c" ; - for c in cc gcc c89 c99 ; do - if ($c -c -o "$dummy.o" "$dummy.c") >/dev/null 2>&1 ; then - CC_FOR_BUILD="$c"; break ; - fi ; - done ; - if test x"$CC_FOR_BUILD" = x ; then - CC_FOR_BUILD=no_compiler_found ; - fi - ;; - ,,*) CC_FOR_BUILD=$CC ;; - ,*,*) CC_FOR_BUILD=$HOST_CC ;; -esac ; set_cc_for_build= ;' +tmp= +# shellcheck disable=SC2172 +trap 'test -z "$tmp" || rm -fr "$tmp"' 0 1 2 13 15 +set_cc_for_build() { + : "${TMPDIR=/tmp}" + # shellcheck disable=SC2039 + { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || + { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir "$tmp" 2>/dev/null) ; } || + { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir "$tmp" 2>/dev/null) && echo "Warning: creating insecure temp directory" >&2 ; } || + { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } + dummy=$tmp/dummy + case ${CC_FOR_BUILD-},${HOST_CC-},${CC-} in + ,,) echo "int x;" > "$dummy.c" + for driver in cc gcc c89 c99 ; do + if ($driver -c -o "$dummy.o" "$dummy.c") >/dev/null 2>&1 ; then + CC_FOR_BUILD="$driver" + break + fi + done + if test x"$CC_FOR_BUILD" = x ; then + CC_FOR_BUILD=no_compiler_found + fi + ;; + ,,*) CC_FOR_BUILD=$CC ;; + ,*,*) CC_FOR_BUILD=$HOST_CC ;; + esac +} + # This is needed to find uname on a Pyramid OSx when run in the BSD universe. # (ghazi at noc.rutgers.edu 1994-08-24) -if (test -f /.attbin/uname) >/dev/null 2>&1 ; then +if test -f /.attbin/uname ; then PATH=$PATH:/.attbin ; export PATH fi @@ -138,7 +140,7 @@ # We could probably try harder. LIBC=gnu - eval "$set_cc_for_build" + set_cc_for_build cat <<-EOF > "$dummy.c" #include #if defined(__UCLIBC__) @@ -150,6 +152,13 @@ #endif EOF eval "`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^LIBC' | sed 's, ,,g'`" + + # If ldd exists, use it to detect musl libc. + if command -v ldd >/dev/null && \ + ldd --version 2>&1 | grep -q ^musl + then + LIBC=musl + fi ;; esac @@ -192,7 +201,7 @@ os=netbsdelf ;; arm*|i386|m68k|ns32k|sh3*|sparc|vax) - eval "$set_cc_for_build" + set_cc_for_build if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ELF__ then @@ -230,7 +239,7 @@ # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: # contains redundant information, the shorter form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. - echo "$machine-${os}${release}${abi}" + echo "$machine-${os}${release}${abi-}" exit ;; *:Bitrig:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'` @@ -382,20 +391,15 @@ echo i386-pc-auroraux"$UNAME_RELEASE" exit ;; i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) - eval "$set_cc_for_build" - SUN_ARCH=i386 - # If there is a compiler, see if it is configured for 64-bit objects. - # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. - # This test works for both compilers. - if [ "$CC_FOR_BUILD" != no_compiler_found ]; then - if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ - (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ - grep IS_64BIT_ARCH >/dev/null - then - SUN_ARCH=x86_64 - fi - fi - echo "$SUN_ARCH"-pc-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`" + UNAME_REL="`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`" + case `isainfo -b` in + 32) + echo i386-pc-solaris2"$UNAME_REL" + ;; + 64) + echo x86_64-pc-solaris2"$UNAME_REL" + ;; + esac exit ;; sun4*:SunOS:6*:*) # According to config.sub, this is the proper way to canonicalize @@ -475,7 +479,7 @@ echo clipper-intergraph-clix"$UNAME_RELEASE" exit ;; mips:*:*:UMIPS | mips:*:*:RISCos) - eval "$set_cc_for_build" + set_cc_for_build sed 's/^ //' << EOF > "$dummy.c" #ifdef __cplusplus #include /* for printf() prototype */ @@ -572,7 +576,7 @@ exit ;; *:AIX:2:3) if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then - eval "$set_cc_for_build" + set_cc_for_build sed 's/^ //' << EOF > "$dummy.c" #include @@ -653,7 +657,7 @@ esac fi if [ "$HP_ARCH" = "" ]; then - eval "$set_cc_for_build" + set_cc_for_build sed 's/^ //' << EOF > "$dummy.c" #define _HPUX_SOURCE @@ -693,7 +697,7 @@ esac if [ "$HP_ARCH" = hppa2.0w ] then - eval "$set_cc_for_build" + set_cc_for_build # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler @@ -719,7 +723,7 @@ echo ia64-hp-hpux"$HPUX_REV" exit ;; 3050*:HI-UX:*:*) - eval "$set_cc_for_build" + set_cc_for_build sed 's/^ //' << EOF > "$dummy.c" #include int @@ -833,6 +837,17 @@ *:BSD/OS:*:*) echo "$UNAME_MACHINE"-unknown-bsdi"$UNAME_RELEASE" exit ;; + arm:FreeBSD:*:*) + UNAME_PROCESSOR=`uname -p` + set_cc_for_build + if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ + | grep -q __ARM_PCS_VFP + then + echo "${UNAME_PROCESSOR}"-unknown-freebsd"`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`"-gnueabi + else + echo "${UNAME_PROCESSOR}"-unknown-freebsd"`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`"-gnueabihf + fi + exit ;; *:FreeBSD:*:*) UNAME_PROCESSOR=`/usr/bin/uname -p` case "$UNAME_PROCESSOR" in @@ -874,7 +889,7 @@ echo "$UNAME_MACHINE"-pc-uwin exit ;; amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) - echo x86_64-unknown-cygwin + echo x86_64-pc-cygwin exit ;; prep*:SunOS:5.*:*) echo powerpcle-unknown-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`" @@ -887,8 +902,8 @@ # other systems with GNU libc and userland echo "$UNAME_MACHINE-unknown-`echo "$UNAME_SYSTEM" | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]"``echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`-$LIBC" exit ;; - i*86:Minix:*:*) - echo "$UNAME_MACHINE"-pc-minix + *:Minix:*:*) + echo "$UNAME_MACHINE"-unknown-minix exit ;; aarch64:Linux:*:*) echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" @@ -915,7 +930,7 @@ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; arm*:Linux:*:*) - eval "$set_cc_for_build" + set_cc_for_build if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_EABI__ then @@ -964,7 +979,7 @@ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; mips:Linux:*:* | mips64:Linux:*:*) - eval "$set_cc_for_build" + set_cc_for_build sed 's/^ //' << EOF > "$dummy.c" #undef CPU #undef ${UNAME_MACHINE} @@ -1278,7 +1293,7 @@ exit ;; *:Darwin:*:*) UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown - eval "$set_cc_for_build" + set_cc_for_build if test "$UNAME_PROCESSOR" = unknown ; then UNAME_PROCESSOR=powerpc fi @@ -1351,6 +1366,7 @@ # "uname -m" is not consistent, so use $cputype instead. 386 # is converted to i386 for consistency with other x86 # operating systems. + # shellcheck disable=SC2154 if test "$cputype" = 386; then UNAME_MACHINE=i386 else @@ -1407,6 +1423,9 @@ amd64:Isilon\ OneFS:*:*) echo x86_64-unknown-onefs exit ;; + *:Unleashed:*:*) + echo "$UNAME_MACHINE"-unknown-unleashed"$UNAME_RELEASE" + exit ;; esac echo "$0: unable to guess system type" >&2 @@ -1462,7 +1481,7 @@ exit 1 # Local variables: -# eval: (add-hook 'write-file-functions 'time-stamp) +# eval: (add-hook 'before-save-hook 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" Modified: config.sub =================================================================== --- config.sub 2018-12-17 14:50:18 UTC (rev 10315) +++ config.sub 2018-12-17 14:51:05 UTC (rev 10316) @@ -2,7 +2,7 @@ # Configuration validation subroutine script. # Copyright 1992-2018 Free Software Foundation, Inc. -timestamp='2018-01-15' +timestamp='2018-12-16' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by @@ -89,7 +89,7 @@ - ) # Use stdin as input. break ;; -* ) - echo "$me: invalid option $1$help" + echo "$me: invalid option $1$help" >&2 exit 1 ;; *local*) @@ -110,1223 +110,1160 @@ exit 1;; esac -# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). -# Here we must recognize all the valid KERNEL-OS combinations. -maybe_os=`echo "$1" | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` -case $maybe_os in - nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \ - linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \ - knetbsd*-gnu* | netbsd*-gnu* | netbsd*-eabi* | \ - kopensolaris*-gnu* | cloudabi*-eabi* | \ - storm-chaos* | os2-emx* | rtmk-nova*) - os=-$maybe_os - basic_machine=`echo "$1" | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` - ;; - android-linux) - os=-linux-android - basic_machine=`echo "$1" | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown - ;; - *) - basic_machine=`echo "$1" | sed 's/-[^-]*$//'` - if [ "$basic_machine" != "$1" ] - then os=`echo "$1" | sed 's/.*-/-/'` - else os=; fi - ;; -esac +# Split fields of configuration type +IFS="-" read field1 field2 field3 field4 <&2 + exit 1 ;; - -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ - -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ - -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ - -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ - -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ - -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ - -apple | -axis | -knuth | -cray | -microblaze*) - os= - basic_machine=$1 + *-*-*-*) + basic_machine=$field1-$field2 + os=$field3-$field4 ;; - -bluegene*) - os=-cnk + *-*-*) + # Ambiguous whether COMPANY is present, or skipped and KERNEL-OS is two + # parts + maybe_os=$field2-$field3 + case $maybe_os in + nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc \ + | linux-newlib* | linux-musl* | linux-uclibc* | uclinux-uclibc* \ + | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* \ + | netbsd*-eabi* | kopensolaris*-gnu* | cloudabi*-eabi* \ + | storm-chaos* | os2-emx* | rtmk-nova*) + basic_machine=$field1 + os=$maybe_os + ;; + android-linux) + basic_machine=$field1-unknown + os=linux-android + ;; + *) + basic_machine=$field1-$field2 + os=$field3 + ;; + esac ;; - -sim | -cisco | -oki | -wec | -winbond) - os= - basic_machine=$1 + *-*) + # A lone config we happen to match not fitting any pattern + case $field1-$field2 in + decstation-3100) + basic_machine=mips-dec + os= + ;; + *-*) + # Second component is usually, but not always the OS + case $field2 in + # Prevent following clause from handling this valid os + sun*os*) + basic_machine=$field1 + os=$field2 + ;; + # Manufacturers + dec* | mips* | sequent* | encore* | pc533* | sgi* | sony* \ + | att* | 7300* | 3300* | delta* | motorola* | sun[234]* \ + | unicom* | ibm* | next | hp | isi* | apollo | altos* \ + | convergent* | ncr* | news | 32* | 3600* | 3100* \ + | hitachi* | c[123]* | convex* | sun | crds | omron* | dg \ + | ultra | tti* | harris | dolphin | highlevel | gould \ + | cbm | ns | masscomp | apple | axis | knuth | cray \ + | microblaze* | sim | cisco \ + | oki | wec | wrs | winbond) + basic_machine=$field1-$field2 + os= + ;; + *) + basic_machine=$field1 + os=$field2 + ;; + esac + ;; + esac ;; - -scout) + *) + # Convert single-component short-hands not valid as part of + # multi-component configurations. + case $field1 in + 386bsd) + basic_machine=i386-pc + os=bsd + ;; + a29khif) + basic_machine=a29k-amd + os=udi + ;; + adobe68k) + basic_machine=m68010-adobe + os=scout + ;; + alliant) + basic_machine=fx80-alliant + os= + ;; + altos | altos3068) + basic_machine=m68k-altos + os= + ;; + am29k) + basic_machine=a29k-none + os=bsd + ;; + amdahl) + basic_machine=580-amdahl + os=sysv + ;; + amiga) + basic_machine=m68k-unknown + os= + ;; + amigaos | amigados) + basic_machine=m68k-unknown + os=amigaos + ;; + amigaunix | amix) + basic_machine=m68k-unknown + os=sysv4 + ;; + apollo68) + basic_machine=m68k-apollo + os=sysv + ;; + apollo68bsd) + basic_machine=m68k-apollo + os=bsd + ;; + aros) + basic_machine=i386-pc + os=aros + ;; + aux) + basic_machine=m68k-apple + os=aux + ;; + balance) + basic_machine=ns32k-sequent + os=dynix + ;; + blackfin) + basic_machine=bfin-unknown + os=linux + ;; + cegcc) + basic_machine=arm-unknown + os=cegcc + ;; + convex-c1) + basic_machine=c1-convex + os=bsd + ;; + convex-c2) + basic_machine=c2-convex + os=bsd + ;; + convex-c32) + basic_machine=c32-convex + os=bsd + ;; + convex-c34) + basic_machine=c34-convex + os=bsd + ;; + convex-c38) + basic_machine=c38-convex + os=bsd + ;; + cray) + basic_machine=j90-cray + os=unicos + ;; + crds | unos) + basic_machine=m68k-crds + os= + ;; + da30) + basic_machine=m68k-da30 + os= + ;; + decstation | pmax | pmin | dec3100 | decstatn) + basic_machine=mips-dec + os= + ;; + delta88) + basic_machine=m88k-motorola + os=sysv3 + ;; + dicos) + basic_machine=i686-pc + os=dicos + ;; + djgpp) + basic_machine=i586-pc + os=msdosdjgpp + ;; + ebmon29k) + basic_machine=a29k-amd + os=ebmon + ;; + es1800 | OSE68k | ose68k | ose | OSE) + basic_machine=m68k-ericsson + os=ose + ;; + gmicro) + basic_machine=tron-gmicro + os=sysv + ;; + go32) + basic_machine=i386-pc + os=go32 + ;; + h8300hms) + basic_machine=h8300-hitachi + os=hms + ;; + h8300xray) + basic_machine=h8300-hitachi + os=xray + ;; + h8500hms) + basic_machine=h8500-hitachi + os=hms + ;; + harris) + basic_machine=m88k-harris + os=sysv3 + ;; + hp300) + basic_machine=m68k-hp + ;; + hp300bsd) + basic_machine=m68k-hp + os=bsd + ;; + hp300hpux) + basic_machine=m68k-hp + os=hpux + ;; + hppaosf) + basic_machine=hppa1.1-hp + os=osf + ;; + hppro) + basic_machine=hppa1.1-hp + os=proelf + ;; + i386mach) + basic_machine=i386-mach + os=mach + ;; + vsta) + basic_machine=i386-pc + os=vsta + ;; + isi68 | isi) + basic_machine=m68k-isi + os=sysv + ;; + m68knommu) + basic_machine=m68k-unknown + os=linux + ;; + magnum | m3230) + basic_machine=mips-mips + os=sysv + ;; + merlin) + basic_machine=ns32k-utek + os=sysv + ;; + mingw64) + basic_machine=x86_64-pc + os=mingw64 + ;; + mingw32) + basic_machine=i686-pc + os=mingw32 + ;; + mingw32ce) + basic_machine=arm-unknown + os=mingw32ce + ;; + monitor) + basic_machine=m68k-rom68k + os=coff + ;; + morphos) + basic_machine=powerpc-unknown + os=morphos + ;; + moxiebox) + basic_machine=moxie-unknown + os=moxiebox + ;; + msdos) + basic_machine=i386-pc + os=msdos + ;; + msys) + basic_machine=i686-pc + os=msys + ;; + mvs) + basic_machine=i370-ibm + os=mvs + ;; + nacl) + basic_machine=le32-unknown + os=nacl + ;; + ncr3000) + basic_machine=i486-ncr + os=sysv4 + ;; + netbsd386) + basic_machine=i386-pc + os=netbsd + ;; + netwinder) + basic_machine=armv4l-rebel + os=linux + ;; + news | news700 | news800 | news900) + basic_machine=m68k-sony + os=newsos + ;; + news1000) + basic_machine=m68030-sony + os=newsos + ;; + necv70) + basic_machine=v70-nec + os=sysv + ;; + nh3000) + basic_machine=m68k-harris + os=cxux + ;; + nh[45]000) + basic_machine=m88k-harris + os=cxux + ;; + nindy960) + basic_machine=i960-intel + os=nindy + ;; + mon960) + basic_machine=i960-intel + os=mon960 + ;; + nonstopux) + basic_machine=mips-compaq + os=nonstopux + ;; + os400) + basic_machine=powerpc-ibm + os=os400 + ;; + OSE68000 | ose68000) + basic_machine=m68000-ericsson + os=ose + ;; + os68k) + basic_machine=m68k-none + os=os68k + ;; + paragon) + basic_machine=i860-intel + os=osf + ;; + parisc) + basic_machine=hppa-unknown + os=linux + ;; + pw32) + basic_machine=i586-unknown + os=pw32 + ;; + rdos | rdos64) + basic_machine=x86_64-pc + os=rdos + ;; + rdos32) + basic_machine=i386-pc + os=rdos + ;; + rom68k) + basic_machine=m68k-rom68k + os=coff + ;; + sa29200) + basic_machine=a29k-amd + os=udi + ;; + sei) + basic_machine=mips-sei + os=seiux + ;; + sequent) + basic_machine=i386-sequent + os= + ;; + sps7) + basic_machine=m68k-bull + os=sysv2 + ;; + st2000) + basic_machine=m68k-tandem + os= + ;; + stratus) + basic_machine=i860-stratus + os=sysv4 + ;; + sun2) + basic_machine=m68000-sun + os= + ;; + sun2os3) + basic_machine=m68000-sun + os=sunos3 + ;; + sun2os4) + basic_machine=m68000-sun + os=sunos4 + ;; + sun3) + basic_machine=m68k-sun + os= + ;; + sun3os3) + basic_machine=m68k-sun + os=sunos3 + ;; + sun3os4) + basic_machine=m68k-sun + os=sunos4 + ;; + sun4) + basic_machine=sparc-sun + os= + ;; + sun4os3) + basic_machine=sparc-sun + os=sunos3 + ;; + sun4os4) + basic_machine=sparc-sun + os=sunos4 + ;; + sun4sol2) + basic_machine=sparc-sun + os=solaris2 + ;; + sun386 | sun386i | roadrunner) + basic_machine=i386-sun + os= + ;; + sv1) + basic_machine=sv1-cray + os=unicos + ;; + symmetry) + basic_machine=i386-sequent + os=dynix + ;; + t3e) + basic_machine=alphaev5-cray + os=unicos + ;; + t90) + basic_machine=t90-cray + os=unicos + ;; + toad1) + basic_machine=pdp10-xkl + os=tops20 + ;; + tpf) + basic_machine=s390x-ibm + os=tpf + ;; + udi29k) + basic_machine=a29k-amd + os=udi + ;; + ultra3) + basic_machine=a29k-nyu + os=sym1 + ;; + v810 | necv810) + basic_machine=v810-nec + os=none + ;; + vaxv) + basic_machine=vax-dec + os=sysv + ;; + vms) + basic_machine=vax-dec + os=vms + ;; + vxworks960) + basic_machine=i960-wrs + os=vxworks + ;; + vxworks68) + basic_machine=m68k-wrs + os=vxworks + ;; + vxworks29k) + basic_machine=a29k-wrs + os=vxworks + ;; + xbox) + basic_machine=i686-pc + os=mingw32 + ;; + ymp) + basic_machine=ymp-cray + os=unicos + ;; + *) + basic_machine=$1 + os= + ;; + esac ;; - -wrs) - os=-vxworks - basic_machine=$1 - ;; - -chorusos*) - os=-chorusos - basic_machine=$1 - ;; - -chorusrdb) - os=-chorusrdb - basic_machine=$1 - ;; - -hiux*) - os=-hiuxwe2 - ;; - -sco6) - os=-sco5v6 - basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` - ;; - -sco5) - os=-sco3.2v5 - basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` - ;; - -sco4) - os=-sco3.2v4 - basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` - ;; - -sco3.2.[4-9]*) - os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` - basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` - ;; - -sco3.2v[4-9]*) - # Don't forget version if it is 3.2v4 or newer. - basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` - ;; - -sco5v6*) - # Don't forget version if it is 3.2v4 or newer. - basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` - ;; - -sco*) - os=-sco3.2v2 - basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` - ;; - -udk*) - basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` - ;; - -isc) - os=-isc2.2 - basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` - ;; - -clix*) - basic_machine=clipper-intergraph - ;; - -isc*) - basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` - ;; - -lynx*178) - os=-lynxos178 - ;; - -lynx*5) - os=-lynxos5 - ;; - -lynx*) - os=-lynxos - ;; - -ptx*) - basic_machine=`echo "$1" | sed -e 's/86-.*/86-sequent/'` - ;; - -psos*) - os=-psos - ;; - -mint | -mint[0-9]*) - basic_machine=m68k-atari - os=-mint - ;; esac -# Decode aliases for certain CPU-COMPANY combinations. +# Decode 1-component or ad-hoc basic machines case $basic_machine in - # Recognize the basic CPU types without company name. - # Some are omitted here because they have special meanings below. - 1750a | 580 \ - | a29k \ - | aarch64 | aarch64_be \ - | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ - | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ - | am33_2.0 \ - | arc | arceb \ - | arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \ - | avr | avr32 \ - | ba \ - | be32 | be64 \ - | bfin \ - | c4x | c8051 | clipper \ - | d10v | d30v | dlx | dsp16xx \ - | e2k | epiphany \ - | fido | fr30 | frv | ft32 \ - | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ - | hexagon \ - | i370 | i860 | i960 | ia16 | ia64 \ - | ip2k | iq2000 \ - | k1om \ - | le32 | le64 \ - | lm32 \ - | m32c | m32r | m32rle | m68000 | m68k | m88k \ - | maxq | mb | microblaze | microblazeel | mcore | mep | metag \ - | mips | mipsbe | mipseb | mipsel | mipsle \ - | mips16 \ - | mips64 | mips64el \ - | mips64octeon | mips64octeonel \ - | mips64orion | mips64orionel \ - | mips64r5900 | mips64r5900el \ - | mips64vr | mips64vrel \ - | mips64vr4100 | mips64vr4100el \ - | mips64vr4300 | mips64vr4300el \ - | mips64vr5000 | mips64vr5000el \ - | mips64vr5900 | mips64vr5900el \ - | mipsisa32 | mipsisa32el \ - | mipsisa32r2 | mipsisa32r2el \ - | mipsisa32r6 | mipsisa32r6el \ - | mipsisa64 | mipsisa64el \ - | mipsisa64r2 | mipsisa64r2el \ - | mipsisa64r6 | mipsisa64r6el \ - | mipsisa64sb1 | mipsisa64sb1el \ - | mipsisa64sr71k | mipsisa64sr71kel \ - | mipsr5900 | mipsr5900el \ - | mipstx39 | mipstx39el \ - | mn10200 | mn10300 \ - | moxie \ - | mt \ - | msp430 \ - | nds32 | nds32le | nds32be \ - | nios | nios2 | nios2eb | nios2el \ - | ns16k | ns32k \ - | open8 | or1k | or1knd | or32 \ - | pdp10 | pj | pjl \ - | powerpc | powerpc64 | powerpc64le | powerpcle \ - | pru \ - | pyramid \ - | riscv32 | riscv64 \ - | rl78 | rx \ - | score \ - | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[234]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ - | sh64 | sh64le \ - | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ - | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ - | spu \ - | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \ - | ubicom32 \ - | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \ - | visium \ - | wasm32 \ - | x86 | xc16x | xstormy16 | xtensa \ - | z8k | z80) - basic_machine=$basic_machine-unknown + # Here we handle the default manufacturer of certain CPU types. It is in + # some cases the only manufacturer, in others, it is the most popular. + w89k) + cpu=hppa1.1 + vendor=winbond ;; - c54x) - basic_machine=tic54x-unknown + op50n) + cpu=hppa1.1 + vendor=oki ;; - c55x) - basic_machine=tic55x-unknown + op60c) + cpu=hppa1.1 + vendor=oki ;; - c6x) - basic_machine=tic6x-unknown + ibm*) + cpu=i370 + vendor=ibm ;; - leon|leon[3-9]) - basic_machine=sparc-$basic_machine + orion105) + cpu=clipper + vendor=highlevel ;; - m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | nvptx | picochip) - basic_machine=$basic_machine-unknown - os=-none + mac | mpw | mac-mpw) + cpu=m68k + vendor=apple ;; - m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65) + pmac | pmac-mpw) + cpu=powerpc + vendor=apple ;; - ms1) - basic_machine=mt-unknown - ;; - strongarm | thumb | xscale) - basic_machine=arm-unknown - ;; - xgate) - basic_machine=$basic_machine-unknown - os=-none - ;; - xscaleeb) - basic_machine=armeb-unknown - ;; - - xscaleel) - basic_machine=armel-unknown - ;; - - # We use `pc' rather than `unknown' - # because (1) that's what they normally are, and - # (2) the word "unknown" tends to confuse beginning users. - i*86 | x86_64) - basic_machine=$basic_machine-pc - ;; - # Object if more than one company name word. - *-*-*) - echo Invalid configuration \`"$1"\': machine \`"$basic_machine"\' not recognized 1>&2 - exit 1 - ;; - # Recognize the basic CPU types with company name. - 580-* \ - | a29k-* \ - | aarch64-* | aarch64_be-* \ - | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ - | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ - | alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \ - | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ - | avr-* | avr32-* \ - | ba-* \ - | be32-* | be64-* \ - | bfin-* | bs2000-* \ - | c[123]* | c30-* | [cjt]90-* | c4x-* \ - | c8051-* | clipper-* | craynv-* | cydra-* \ - | d10v-* | d30v-* | dlx-* \ - | e2k-* | elxsi-* \ - | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ - | h8300-* | h8500-* \ - | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ - | hexagon-* \ - | i*86-* | i860-* | i960-* | ia16-* | ia64-* \ - | ip2k-* | iq2000-* \ - | k1om-* \ - | le32-* | le64-* \ - | lm32-* \ - | m32c-* | m32r-* | m32rle-* \ - | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ - | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \ - | microblaze-* | microblazeel-* \ - | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ - | mips16-* \ - | mips64-* | mips64el-* \ - | mips64octeon-* | mips64octeonel-* \ - | mips64orion-* | mips64orionel-* \ - | mips64r5900-* | mips64r5900el-* \ - | mips64vr-* | mips64vrel-* \ - | mips64vr4100-* | mips64vr4100el-* \ - | mips64vr4300-* | mips64vr4300el-* \ - | mips64vr5000-* | mips64vr5000el-* \ - | mips64vr5900-* | mips64vr5900el-* \ - | mipsisa32-* | mipsisa32el-* \ - | mipsisa32r2-* | mipsisa32r2el-* \ - | mipsisa32r6-* | mipsisa32r6el-* \ - | mipsisa64-* | mipsisa64el-* \ - | mipsisa64r2-* | mipsisa64r2el-* \ - | mipsisa64r6-* | mipsisa64r6el-* \ - | mipsisa64sb1-* | mipsisa64sb1el-* \ - | mipsisa64sr71k-* | mipsisa64sr71kel-* \ - | mipsr5900-* | mipsr5900el-* \ - | mipstx39-* | mipstx39el-* \ - | mmix-* \ - | mt-* \ - | msp430-* \ - | nds32-* | nds32le-* | nds32be-* \ - | nios-* | nios2-* | nios2eb-* | nios2el-* \ - | none-* | np1-* | ns16k-* | ns32k-* \ - | open8-* \ - | or1k*-* \ - | orion-* \ - | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ - | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \ - | pru-* \ - | pyramid-* \ - | riscv32-* | riscv64-* \ - | rl78-* | romp-* | rs6000-* | rx-* \ - | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ - | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ - | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ - | sparclite-* \ - | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx*-* \ - | tahoe-* \ - | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ - | tile*-* \ - | tron-* \ - | ubicom32-* \ - | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \ - | vax-* \ - | visium-* \ - | wasm32-* \ - | we32k-* \ - | x86-* | x86_64-* | xc16x-* | xps100-* \ - | xstormy16-* | xtensa*-* \ - | ymp-* \ - | z8k-* | z80-*) - ;; - # Recognize the basic CPU types without company name, with glob match. - xtensa*) - basic_machine=$basic_machine-unknown - ;; # Recognize the various machine names and aliases which stand # for a CPU type and a company and sometimes even an OS. - 386bsd) - basic_machine=i386-pc - os=-bsd - ;; 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) - basic_machine=m68000-att + cpu=m68000 + vendor=att ;; 3b*) - basic_machine=we32k-att + cpu=we32k + vendor=att ;; - a29khif) - basic_machine=a29k-amd - os=-udi - ;; - abacus) - basic_machine=abacus-unknown - ;; - adobe68k) - basic_machine=m68010-adobe - os=-scout - ;; - alliant | fx80) - basic_machine=fx80-alliant - ;; - altos | altos3068) - basic_machine=m68k-altos - ;; - am29k) - basic_machine=a29k-none - os=-bsd - ;; - amd64) - basic_machine=x86_64-pc - ;; - amd64-*) - basic_machine=x86_64-`echo "$basic_machine" | sed 's/^[^-]*-//'` - ;; - amdahl) - basic_machine=580-amdahl - os=-sysv - ;; - amiga | amiga-*) - basic_machine=m68k-unknown - ;; - amigaos | amigados) - basic_machine=m68k-unknown - os=-amigaos - ;; - amigaunix | amix) - basic_machine=m68k-unknown - os=-sysv4 - ;; - apollo68) - basic_machine=m68k-apollo - os=-sysv - ;; - apollo68bsd) - basic_machine=m68k-apollo - os=-bsd - ;; - aros) - basic_machine=i386-pc - os=-aros - ;; - asmjs) - basic_machine=asmjs-unknown - ;; - aux) - basic_machine=m68k-apple - os=-aux - ;; - balance) - basic_machine=ns32k-sequent - os=-dynix - ;; - blackfin) - basic_machine=bfin-unknown - os=-linux - ;; - blackfin-*) - basic_machine=bfin-`echo "$basic_machine" | sed 's/^[^-]*-//'` - os=-linux - ;; bluegene*) - basic_machine=powerpc-ibm - os=-cnk + cpu=powerpc + vendor=ibm + os=cnk ;; - c54x-*) - basic_machine=tic54x-`echo "$basic_machine" | sed 's/^[^-]*-//'` - ;; - c55x-*) - basic_machine=tic55x-`echo "$basic_machine" | sed 's/^[^-]*-//'` - ;; - c6x-*) - basic_machine=tic6x-`echo "$basic_machine" | sed 's/^[^-]*-//'` - ;; - c90) - basic_machine=c90-cray - os=-unicos - ;; - cegcc) - basic_machine=arm-unknown - os=-cegcc - ;; - convex-c1) - basic_machine=c1-convex - os=-bsd - ;; - convex-c2) - basic_machine=c2-convex - os=-bsd - ;; - convex-c32) - basic_machine=c32-convex - os=-bsd - ;; - convex-c34) - basic_machine=c34-convex - os=-bsd - ;; - convex-c38) - basic_machine=c38-convex - os=-bsd - ;; - cray | j90) - basic_machine=j90-cray - os=-unicos - ;; - craynv) - basic_machine=craynv-cray - os=-unicosmp - ;; - cr16 | cr16-*) - basic_machine=cr16-unknown - os=-elf - ;; - crds | unos) - basic_machine=m68k-crds - ;; - crisv32 | crisv32-* | etraxfs*) - basic_machine=crisv32-axis - ;; - cris | cris-* | etrax*) - basic_machine=cris-axis - ;; - crx) - basic_machine=crx-unknown - os=-elf - ;; - da30 | da30-*) - basic_machine=m68k-da30 - ;; - decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) - basic_machine=mips-dec - ;; decsystem10* | dec10*) - basic_machine=pdp10-dec - os=-tops10 + cpu=pdp10 + vendor=dec + os=tops10 ;; decsystem20* | dec20*) - basic_machine=pdp10-dec - os=-tops20 + cpu=pdp10 + vendor=dec + os=tops20 ;; delta | 3300 | motorola-3300 | motorola-delta \ | 3300-motorola | delta-motorola) - basic_machine=m68k-motorola + cpu=m68k + vendor=motorola ;; - delta88) - basic_machine=m88k-motorola - os=-sysv3 - ;; - dicos) - basic_machine=i686-pc - os=-dicos - ;; - djgpp) - basic_machine=i586-pc - os=-msdosdjgpp - ;; - dpx20 | dpx20-*) - basic_machine=rs6000-bull - os=-bosx - ;; dpx2*) - basic_machine=m68k-bull - os=-sysv3 + cpu=m68k + vendor=bull + os=sysv3 ;; - e500v[12]) - basic_machine=powerpc-unknown - os=$os"spe" + encore | umax | mmax) + cpu=ns32k + vendor=encore ;; - e500v[12]-*) - basic_machine=powerpc-`echo "$basic_machine" | sed 's/^[^-]*-//'` - os=$os"spe" - ;; - ebmon29k) - basic_machine=a29k-amd - os=-ebmon - ;; elxsi) - basic_machine=elxsi-elxsi - os=-bsd + cpu=elxsi + vendor=elxsi + os=${os:-bsd} ;; - encore | umax | mmax) - basic_machine=ns32k-encore - ;; - es1800 | OSE68k | ose68k | ose | OSE) - basic_machine=m68k-ericsson - os=-ose - ;; fx2800) - basic_machine=i860-alliant + cpu=i860 + vendor=alliant ;; genix) - basic_machine=ns32k-ns + cpu=ns32k + vendor=ns ;; - gmicro) - basic_machine=tron-gmicro - os=-sysv - ;; - go32) - basic_machine=i386-pc - os=-go32 - ;; h3050r* | hiux*) - basic_machine=hppa1.1-hitachi - os=-hiuxwe2 + cpu=hppa1.1 + vendor=hitachi + os=hiuxwe2 ;; - h8300hms) - basic_machine=h8300-hitachi - os=-hms - ;; - h8300xray) - basic_machine=h8300-hitachi - os=-xray - ;; - h8500hms) - basic_machine=h8500-hitachi - os=-hms - ;; - harris) - basic_machine=m88k-harris - os=-sysv3 - ;; - hp300-*) - basic_machine=m68k-hp - ;; - hp300bsd) - basic_machine=m68k-hp - os=-bsd - ;; - hp300hpux) - basic_machine=m68k-hp - os=-hpux - ;; hp3k9[0-9][0-9] | hp9[0-9][0-9]) - basic_machine=hppa1.0-hp + cpu=hppa1.0 + vendor=hp ;; hp9k2[0-9][0-9] | hp9k31[0-9]) - basic_machine=m68000-hp + cpu=m68000 + vendor=hp ;; hp9k3[2-9][0-9]) - basic_machine=m68k-hp + cpu=m68k + vendor=hp ;; hp9k6[0-9][0-9] | hp6[0-9][0-9]) - basic_machine=hppa1.0-hp + cpu=hppa1.0 + vendor=hp ;; hp9k7[0-79][0-9] | hp7[0-79][0-9]) - basic_machine=hppa1.1-hp + cpu=hppa1.1 + vendor=hp ;; hp9k78[0-9] | hp78[0-9]) # FIXME: really hppa2.0-hp - basic_machine=hppa1.1-hp + cpu=hppa1.1 + vendor=hp ;; hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) # FIXME: really hppa2.0-hp - basic_machine=hppa1.1-hp + cpu=hppa1.1 + vendor=hp ;; hp9k8[0-9][13679] | hp8[0-9][13679]) - basic_machine=hppa1.1-hp + cpu=hppa1.1 + vendor=hp ;; hp9k8[0-9][0-9] | hp8[0-9][0-9]) - basic_machine=hppa1.0-hp + cpu=hppa1.0 + vendor=hp ;; - hppaosf) - basic_machine=hppa1.1-hp - os=-osf - ;; - hppro) - basic_machine=hppa1.1-hp - os=-proelf - ;; - i370-ibm* | ibm*) - basic_machine=i370-ibm - ;; i*86v32) - basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'` - os=-sysv32 + cpu=`echo "$1" | sed -e 's/86.*/86/'` + vendor=pc + os=sysv32 ;; i*86v4*) - basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'` - os=-sysv4 + cpu=`echo "$1" | sed -e 's/86.*/86/'` + vendor=pc + os=sysv4 ;; i*86v) - basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'` - os=-sysv + cpu=`echo "$1" | sed -e 's/86.*/86/'` + vendor=pc + os=sysv ;; i*86sol2) - basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'` - os=-solaris2 + cpu=`echo "$1" | sed -e 's/86.*/86/'` + vendor=pc + os=solaris2 ;; - i386mach) - basic_machine=i386-mach - os=-mach + j90 | j90-cray) + cpu=j90 + vendor=cray + os=${os:-unicos} ;; - vsta) - basic_machine=i386-unknown - os=-vsta - ;; iris | iris4d) - basic_machine=mips-sgi + cpu=mips + vendor=sgi case $os in - -irix*) + irix*) ;; *) - os=-irix4 + os=irix4 ;; esac ;; - isi68 | isi) - basic_machine=m68k-isi - os=-sysv - ;; - leon-*|leon[3-9]-*) - basic_machine=sparc-`echo "$basic_machine" | sed 's/-.*//'` - ;; - m68knommu) - basic_machine=m68k-unknown - os=-linux - ;; - m68knommu-*) - basic_machine=m68k-`echo "$basic_machine" | sed 's/^[^-]*-//'` - os=-linux - ;; - magnum | m3230) - basic_machine=mips-mips - os=-sysv - ;; - merlin) - basic_machine=ns32k-utek - os=-sysv - ;; - microblaze*) - basic_machine=microblaze-xilinx - ;; - mingw64) - basic_machine=x86_64-pc - os=-mingw64 - ;; - mingw32) - basic_machine=i686-pc - os=-mingw32 - ;; - mingw32ce) - basic_machine=arm-unknown - os=-mingw32ce - ;; miniframe) - basic_machine=m68000-convergent + cpu=m68000 + vendor=convergent ;; - *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) - basic_machine=m68k-atari - os=-mint + *mint | mint[0-9]* | *MiNT | *MiNT[0-9]*) + cpu=m68k + vendor=atari + os=mint ;; - mips3*-*) - basic_machine=`echo "$basic_machine" | sed -e 's/mips3/mips64/'` - ;; - mips3*) - basic_machine=`echo "$basic_machine" | sed -e 's/mips3/mips64/'`-unknown - ;; - monitor) - basic_machine=m68k-rom68k - os=-coff - ;; - morphos) - basic_machine=powerpc-unknown - os=-morphos - ;; - moxiebox) - basic_machine=moxie-unknown - os=-moxiebox - ;; - msdos) - basic_machine=i386-pc - os=-msdos - ;; - ms1-*) - basic_machine=`echo "$basic_machine" | sed -e 's/ms1-/mt-/'` - ;; - msys) - basic_machine=i686-pc - os=-msys - ;; - mvs) - basic_machine=i370-ibm - os=-mvs - ;; - nacl) - basic_machine=le32-unknown - os=-nacl - ;; - ncr3000) - basic_machine=i486-ncr - os=-sysv4 - ;; - netbsd386) - basic_machine=i386-unknown - os=-netbsd - ;; - netwinder) - basic_machine=armv4l-rebel - os=-linux - ;; - news | news700 | news800 | news900) - basic_machine=m68k-sony - os=-newsos - ;; - news1000) - basic_machine=m68030-sony - os=-newsos - ;; news-3600 | risc-news) - basic_machine=mips-sony - os=-newsos + cpu=mips + vendor=sony + os=newsos ;; - necv70) - basic_machine=v70-nec - os=-sysv - ;; next | m*-next) - basic_machine=m68k-next + cpu=m68k + vendor=next case $os in - -nextstep* ) + nextstep* ) ;; - -ns2*) - os=-nextstep2 + ns2*) + os=nextstep2 ;; *) - os=-nextstep3 + os=nextstep3 ;; esac ;; - nh3000) - basic_machine=m68k-harris - os=-cxux - ;; - nh[45]000) - basic_machine=m88k-harris - os=-cxux - ;; - nindy960) - basic_machine=i960-intel - os=-nindy - ;; - mon960) - basic_machine=i960-intel - os=-mon960 - ;; - nonstopux) - basic_machine=mips-compaq - os=-nonstopux - ;; np1) - basic_machine=np1-gould + cpu=np1 + vendor=gould ;; - neo-tandem) - basic_machine=neo-tandem - ;; - nse-tandem) - basic_machine=nse-tandem - ;; - nsr-tandem) - basic_machine=nsr-tandem - ;; - nsv-tandem) - basic_machine=nsv-tandem - ;; - nsx-tandem) - basic_machine=nsx-tandem - ;; op50n-* | op60c-*) - basic_machine=hppa1.1-oki - os=-proelf + cpu=hppa1.1 + vendor=oki + os=proelf ;; - openrisc | openrisc-*) - basic_machine=or32-unknown - ;; - os400) - basic_machine=powerpc-ibm - os=-os400 - ;; - OSE68000 | ose68000) - basic_machine=m68000-ericsson - os=-ose - ;; - os68k) - basic_machine=m68k-none - os=-os68k - ;; pa-hitachi) - basic_machine=hppa1.1-hitachi - os=-hiuxwe2 + cpu=hppa1.1 + vendor=hitachi + os=hiuxwe2 ;; - paragon) - basic_machine=i860-intel - os=-osf - ;; - parisc) - basic_machine=hppa-unknown - os=-linux - ;; - parisc-*) - basic_machine=hppa-`echo "$basic_machine" | sed 's/^[^-]*-//'` - os=-linux - ;; pbd) - basic_machine=sparc-tti + cpu=sparc + vendor=tti ;; pbb) - basic_machine=m68k-tti + cpu=m68k + vendor=tti ;; - pc532 | pc532-*) - basic_machine=ns32k-pc532 + pc532) + cpu=ns32k + vendor=pc532 ;; - pc98) - basic_machine=i386-pc - ;; - pc98-*) - basic_machine=i386-`echo "$basic_machine" | sed 's/^[^-]*-//'` - ;; - pentium | p5 | k5 | k6 | nexgen | viac3) - basic_machine=i586-pc - ;; - pentiumpro | p6 | 6x86 | athlon | athlon_*) - basic_machine=i686-pc - ;; - pentiumii | pentium2 | pentiumiii | pentium3) - basic_machine=i686-pc - ;; - pentium4) - basic_machine=i786-pc - ;; - pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) - basic_machine=i586-`echo "$basic_machine" | sed 's/^[^-]*-//'` - ;; - pentiumpro-* | p6-* | 6x86-* | athlon-*) - basic_machine=i686-`echo "$basic_machine" | sed 's/^[^-]*-//'` - ;; - pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) - basic_machine=i686-`echo "$basic_machine" | sed 's/^[^-]*-//'` - ;; - pentium4-*) - basic_machine=i786-`echo "$basic_machine" | sed 's/^[^-]*-//'` - ;; pn) - basic_machine=pn-gould + cpu=pn + vendor=gould ;; - power) basic_machine=power-ibm + power) + cpu=power + vendor=ibm ;; - ppc | ppcbe) basic_machine=powerpc-unknown + ps2) + cpu=i386 + vendor=ibm ;; - ppc-* | ppcbe-*) - basic_machine=powerpc-`echo "$basic_machine" | sed 's/^[^-]*-//'` + rm[46]00) + cpu=mips + vendor=siemens ;; - ppcle | powerpclittle) - basic_machine=powerpcle-unknown + rtpc | rtpc-*) + cpu=romp + vendor=ibm ;; - ppcle-* | powerpclittle-*) - basic_machine=powerpcle-`echo "$basic_machine" | sed 's/^[^-]*-//'` + sde) + cpu=mipsisa32 + vendor=sde + os=${os:-elf} ;; - ppc64) basic_machine=powerpc64-unknown + simso-wrs) + cpu=sparclite + vendor=wrs + os=vxworks ;; - ppc64-*) basic_machine=powerpc64-`echo "$basic_machine" | sed 's/^[^-]*-//'` + tower | tower-32) + cpu=m68k + vendor=ncr ;; - ppc64le | powerpc64little) - basic_machine=powerpc64le-unknown + vpp*|vx|vx-*) + cpu=f301 + vendor=fujitsu ;; - ppc64le-* | powerpc64little-*) - basic_machine=powerpc64le-`echo "$basic_machine" | sed 's/^[^-]*-//'` + w65) + cpu=w65 + vendor=wdc ;; - ps2) - basic_machine=i386-ibm + w89k-*) + cpu=hppa1.1 + vendor=winbond + os=proelf ;; - pw32) - basic_machine=i586-unknown - os=-pw32 + none) + cpu=none + vendor=none ;; - rdos | rdos64) - basic_machine=x86_64-pc - os=-rdos + leon|leon[3-9]) + cpu=sparc + vendor=$basic_machine ;; - rdos32) - basic_machine=i386-pc - os=-rdos + leon-*|leon[3-9]-*) + cpu=sparc + vendor=`echo "$basic_machine" | sed 's/-.*//'` ;; - rom68k) - basic_machine=m68k-rom68k - os=-coff + + *-*) + IFS="-" read cpu vendor <&2 - exit 1 + # Recognize the canonical CPU types that are allowed with any + # company name. + case $cpu in + 1750a | 580 \ + | a29k \ + | aarch64 | aarch64_be \ + | abacus \ + | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] \ + | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] \ + | alphapca5[67] | alpha64pca5[67] \ + | am33_2.0 \ + | amdgcn \ + | arc | arceb \ + | arm | arm[lb]e | arme[lb] | armv* \ + | avr | avr32 \ + | asmjs \ + | ba \ + | be32 | be64 \ + | bfin | bs2000 \ + | c[123]* | c30 | [cjt]90 | c4x \ + | c8051 | clipper | craynv | csky | cydra \ + | d10v | d30v | dlx | dsp16xx \ + | e2k | elxsi | epiphany \ + | f30[01] | f700 | fido | fr30 | frv | ft32 | fx80 \ + | h8300 | h8500 \ + | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ + | hexagon \ + | i370 | i*86 | i860 | i960 | ia16 | ia64 \ + | ip2k | iq2000 \ + | k1om \ + | le32 | le64 \ + | lm32 \ + | m32c | m32r | m32rle \ + | m5200 | m68000 | m680[012346]0 | m68360 | m683?2 | m68k | v70 | w65 \ + | m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | nvptx | picochip \ + | m88110 | m88k | maxq | mb | mcore | mep | metag \ + | microblaze | microblazeel \ + | mips | mipsbe | mipseb | mipsel | mipsle \ + | mips16 \ + | mips64 | mips64el \ + | mips64octeon | mips64octeonel \ + | mips64orion | mips64orionel \ + | mips64r5900 | mips64r5900el \ + | mips64vr | mips64vrel \ + | mips64vr4100 | mips64vr4100el \ + | mips64vr4300 | mips64vr4300el \ + | mips64vr5000 | mips64vr5000el \ + | mips64vr5900 | mips64vr5900el \ + | mipsisa32 | mipsisa32el \ + | mipsisa32r2 | mipsisa32r2el \ + | mipsisa32r6 | mipsisa32r6el \ + | mipsisa64 | mipsisa64el \ + | mipsisa64r2 | mipsisa64r2el \ + | mipsisa64r6 | mipsisa64r6el \ + | mipsisa64sb1 | mipsisa64sb1el \ + | mipsisa64sr71k | mipsisa64sr71kel \ + | mipsr5900 | mipsr5900el \ + | mipstx39 | mipstx39el \ + | mmix \ + | mn10200 | mn10300 \ + | moxie \ + | mt \ + | msp430 \ + | nds32 | nds32le | nds32be \ + | nfp \ + | nios | nios2 | nios2eb | nios2el \ + | none | np1 | ns16k | ns32k \ + | open8 \ + | or1k* \ + | or32 \ + | orion \ + | pdp10 | pdp11 | pj | pjl | pn | power \ + | powerpc | powerpc64 | powerpc64le | powerpcle | powerpcspe \ + | pru \ + | pyramid \ + | riscv | riscv32 | riscv64 \ + | rl78 | romp | rs6000 | rx \ + | score \ + | sh | sh[1234] | sh[24]a | sh[24]ae[lb] | sh[23]e | she[lb] | sh[lb]e \ + | sh[1234]e[lb] | sh[12345][lb]e | sh[23]ele | sh64 | sh64le \ + | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet \ + | sparclite \ + | sparcv8 | sparcv9 | sparcv9b | sparcv9v | sv1 | sx* \ + | spu \ + | tahoe \ + | tic30 | tic4x | tic54x | tic55x | tic6x | tic80 \ + | tron \ + | ubicom32 \ + | v850 | v850e | v850e1 | v850es | v850e2 | v850e2v3 \ + | vax \ + | visium \ + | wasm32 \ + | we32k \ + | x86 | x86_64 | xc16x | xgate | xps100 \ + | xstormy16 | xtensa* \ + | ymp \ + | z8k | z80) + ;; + + *) + echo Invalid configuration \`"$1"\': machine \`"$cpu-$vendor"\' not recognized 1>&2 + exit 1 + ;; + esac ;; esac # Here we canonicalize certain aliases for manufacturers. -case $basic_machine in - *-digital*) - basic_machine=`echo "$basic_machine" | sed 's/digital.*/dec/'` +case $vendor in + digital*) + vendor=dec ;; - *-commodore*) - basic_machine=`echo "$basic_machine" | sed 's/commodore.*/cbm/'` + commodore*) + vendor=cbm ;; *) ;; @@ -1334,198 +1271,245 @@ # Decode manufacturer-specific aliases for certain operating systems. -if [ x"$os" != x"" ] +if [ x$os != x ] then case $os in # First match some system type aliases that might get confused # with valid system types. - # -solaris* is a basic system type, with this one exception. - -auroraux) - os=-auroraux + # solaris* is a basic system type, with this one exception. + auroraux) + os=auroraux ;; - -solaris1 | -solaris1.*) + bluegene*) + os=cnk + ;; + solaris1 | solaris1.*) os=`echo $os | sed -e 's|solaris1|sunos4|'` ;; - -solaris) - os=-solaris2 + solaris) + os=solaris2 ;; - -unixware*) - os=-sysv4.2uw + unixware*) + os=sysv4.2uw ;; - -gnu/linux*) + gnu/linux*) os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` ;; # es1800 is here to avoid being matched by es* (a different OS) - -es1800*) - os=-ose + es1800*) + os=ose ;; + # Some version numbers need modification + chorusos*) + os=chorusos + ;; + isc) + os=isc2.2 + ;; + sco6) + os=sco5v6 + ;; + sco5) + os=sco3.2v5 + ;; + sco4) + os=sco3.2v4 + ;; + sco3.2.[4-9]*) + os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` + ;; + sco3.2v[4-9]* | sco5v6*) + # Don't forget version if it is 3.2v4 or newer. + ;; + scout) + # Don't match below + ;; + sco*) + os=sco3.2v2 + ;; + psos*) + os=psos + ;; # Now accept the basic system types. # The portable systems comes first. # Each alternative MUST end in a * to match a version number. - # -sysv* is not here because it comes later, after sysvr4. - -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ - | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\ - | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \ - | -sym* | -kopensolaris* | -plan9* \ - | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ - | -aos* | -aros* | -cloudabi* | -sortix* \ - | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ - | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ - | -hiux* | -knetbsd* | -mirbsd* | -netbsd* \ - | -bitrig* | -openbsd* | -solidbsd* | -libertybsd* \ - | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ - | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ - | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ - | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ - | -chorusos* | -chorusrdb* | -cegcc* | -glidix* \ - | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ - | -midipix* | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \ - | -linux-newlib* | -linux-musl* | -linux-uclibc* \ - | -uxpv* | -beos* | -mpeix* | -udk* | -moxiebox* \ - | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* \ - | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ - | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ - | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ - | -morphos* | -superux* | -rtmk* | -windiss* \ - | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ - | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* \ - | -onefs* | -tirtos* | -phoenix* | -fuchsia* | -redox* | -bme*) + # sysv* is not here because it comes later, after sysvr4. + gnu* | bsd* | mach* | minix* | genix* | ultrix* | irix* \ + | *vms* | esix* | aix* | cnk* | sunos | sunos[34]*\ + | hpux* | unos* | osf* | luna* | dgux* | auroraux* | solaris* \ + | sym* | kopensolaris* | plan9* \ + | amigaos* | amigados* | msdos* | newsos* | unicos* | aof* \ + | aos* | aros* | cloudabi* | sortix* \ + | nindy* | vxsim* | vxworks* | ebmon* | hms* | mvs* \ + | clix* | riscos* | uniplus* | iris* | isc* | rtu* | xenix* \ + | knetbsd* | mirbsd* | netbsd* \ + | bitrig* | openbsd* | solidbsd* | libertybsd* \ + | ekkobsd* | kfreebsd* | freebsd* | riscix* | lynxos* \ + | bosx* | nextstep* | cxux* | aout* | elf* | oabi* \ + | ptx* | coff* | ecoff* | winnt* | domain* | vsta* \ + | udi* | eabi* | lites* | ieee* | go32* | aux* | hcos* \ + | chorusrdb* | cegcc* | glidix* \ + | cygwin* | msys* | pe* | moss* | proelf* | rtems* \ + | midipix* | mingw32* | mingw64* | linux-gnu* | linux-android* \ + | linux-newlib* | linux-musl* | linux-uclibc* \ + | uxpv* | beos* | mpeix* | udk* | moxiebox* \ + | interix* | uwin* | mks* | rhapsody* | darwin* \ + | openstep* | oskit* | conix* | pw32* | nonstopux* \ + | storm-chaos* | tops10* | tenex* | tops20* | its* \ + | os2* | vos* | palmos* | uclinux* | nucleus* \ + | morphos* | superux* | rtmk* | windiss* \ + | powermax* | dnix* | nx6 | nx7 | sei* | dragonfly* \ + | skyos* | haiku* | rdos* | toppers* | drops* | es* \ + | onefs* | tirtos* | phoenix* | fuchsia* | redox* | bme* \ + | midnightbsd* | amdhsa* | unleashed*) # Remember, each alternative MUST END IN *, to match a version number. ;; - -qnx*) - case $basic_machine in - x86-* | i*86-*) + qnx*) + case $cpu in + x86 | i*86) ;; *) - os=-nto$os + os=nto-$os ;; esac ;; - -nto-qnx*) + hiux*) + os=hiuxwe2 ;; - -nto*) + nto-qnx*) + ;; + nto*) os=`echo $os | sed -e 's|nto|nto-qnx|'` ;; - -sim | -xray | -os68k* | -v88r* \ - | -windows* | -osx | -abug | -netware* | -os9* \ - | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) + sim | xray | os68k* | v88r* \ + | windows* | osx | abug | netware* | os9* \ + | macos* | mpw* | magic* | mmixware* | mon960* | lnews*) ;; - -mac*) + linux-dietlibc) + os=linux-dietlibc + ;; + linux*) + os=`echo $os | sed -e 's|linux|linux-gnu|'` + ;; + lynx*178) + os=lynxos178 + ;; + lynx*5) + os=lynxos5 + ;; + lynx*) + os=lynxos + ;; + mac*) os=`echo "$os" | sed -e 's|mac|macos|'` ;; - -linux-dietlibc) - os=-linux-dietlibc + opened*) + os=openedition ;; - -linux*) - os=`echo $os | sed -e 's|linux|linux-gnu|'` + os400*) + os=os400 ;; - -sunos5*) + sunos5*) os=`echo "$os" | sed -e 's|sunos5|solaris2|'` ;; - -sunos6*) + sunos6*) os=`echo "$os" | sed -e 's|sunos6|solaris3|'` ;; - -opened*) - os=-openedition + wince*) + os=wince ;; - -os400*) - os=-os400 + utek*) + os=bsd ;; - -wince*) - os=-wince + dynix*) + os=bsd ;; - -utek*) - os=-bsd + acis*) + os=aos ;; - -dynix*) - os=-bsd + atheos*) + os=atheos ;; - -acis*) - os=-aos + syllable*) + os=syllable ;; - -atheos*) - os=-atheos + 386bsd) + os=bsd ;; - -syllable*) - os=-syllable + ctix* | uts*) + os=sysv ;; - -386bsd) - os=-bsd + nova*) + os=rtmk-nova ;; - -ctix* | -uts*) - os=-sysv + ns2) + os=nextstep2 ;; - -nova*) - os=-rtmk-nova + nsk*) + os=nsk ;; - -ns2) - os=-nextstep2 - ;; - -nsk*) - os=-nsk - ;; # Preserve the version number of sinix5. - -sinix5.*) + sinix5.*) os=`echo $os | sed -e 's|sinix|sysv|'` ;; - -sinix*) - os=-sysv4 + sinix*) + os=sysv4 ;; - -tpf*) - os=-tpf + tpf*) + os=tpf ;; - -triton*) - os=-sysv3 + triton*) + os=sysv3 ;; - -oss*) - os=-sysv3 + oss*) + os=sysv3 ;; - -svr4*) - os=-sysv4 + svr4*) + os=sysv4 ;; - -svr3) - os=-sysv3 + svr3) + os=sysv3 ;; - -sysvr4) - os=-sysv4 + sysvr4) + os=sysv4 ;; - # This must come after -sysvr4. - -sysv*) + # This must come after sysvr4. + sysv*) ;; - -ose*) - os=-ose + ose*) + os=ose ;; - -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) - os=-mint + *mint | mint[0-9]* | *MiNT | MiNT[0-9]*) + os=mint ;; - -zvmoe) - os=-zvmoe + zvmoe) + os=zvmoe ;; - -dicos*) - os=-dicos + dicos*) + os=dicos ;; - -pikeos*) + pikeos*) # Until real need of OS specific support for # particular features comes up, bare metal # configurations are quite functional. - case $basic_machine in + case $cpu in arm*) - os=-eabi + os=eabi ;; *) - os=-elf + os=elf ;; esac ;; - -nacl*) + nacl*) ;; - -ios) + ios) ;; - -none) + none) ;; + *-eabi) + ;; *) - # Get rid of the `-' at the beginning of $os. - os=`echo $os | sed 's/[^-]*-//'` echo Invalid configuration \`"$1"\': system \`"$os"\' not recognized 1>&2 exit 1 ;; @@ -1542,175 +1526,181 @@ # will signal an error saying that MANUFACTURER isn't an operating # system, and we'll never get to this point. -case $basic_machine in +case $cpu-$vendor in score-*) - os=-elf + os=elf ;; spu-*) - os=-elf + os=elf ;; *-acorn) - os=-riscix1.2 + os=riscix1.2 ;; arm*-rebel) - os=-linux + os=linux ;; arm*-semi) - os=-aout + os=aout ;; c4x-* | tic4x-*) - os=-coff + os=coff ;; c8051-*) - os=-elf + os=elf ;; + clipper-intergraph) + os=clix + ;; hexagon-*) - os=-elf + os=elf ;; tic54x-*) - os=-coff + os=coff ;; tic55x-*) - os=-coff + os=coff ;; tic6x-*) - os=-coff + os=coff ;; # This must come before the *-dec entry. pdp10-*) - os=-tops20 + os=tops20 ;; pdp11-*) - os=-none + os=none ;; *-dec | vax-*) - os=-ultrix4.2 + os=ultrix4.2 ;; m68*-apollo) - os=-domain + os=domain ;; i386-sun) - os=-sunos4.0.2 + os=sunos4.0.2 ;; m68000-sun) - os=-sunos3 + os=sunos3 ;; m68*-cisco) - os=-aout + os=aout ;; mep-*) - os=-elf + os=elf ;; mips*-cisco) - os=-elf + os=elf ;; mips*-*) - os=-elf + os=elf ;; or32-*) - os=-coff + os=coff ;; *-tti) # must be before sparc entry or we get the wrong os. - os=-sysv3 + os=sysv3 ;; sparc-* | *-sun) - os=-sunos4.1.1 + os=sunos4.1.1 ;; pru-*) - os=-elf + os=elf ;; *-be) - os=-beos + os=beos ;; *-ibm) - os=-aix + os=aix ;; *-knuth) - os=-mmixware + os=mmixware ;; *-wec) - os=-proelf + os=proelf ;; *-winbond) - os=-proelf + os=proelf ;; *-oki) - os=-proelf + os=proelf ;; *-hp) - os=-hpux + os=hpux ;; *-hitachi) - os=-hiux + os=hiux ;; i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) - os=-sysv + os=sysv ;; *-cbm) - os=-amigaos + os=amigaos ;; *-dg) - os=-dgux + os=dgux ;; *-dolphin) - os=-sysv3 + os=sysv3 ;; m68k-ccur) - os=-rtu + os=rtu ;; m88k-omron*) - os=-luna + os=luna ;; *-next) - os=-nextstep + os=nextstep ;; *-sequent) - os=-ptx + os=ptx ;; *-crds) - os=-unos + os=unos ;; *-ns) - os=-genix + os=genix ;; i370-*) - os=-mvs + os=mvs ;; *-gould) - os=-sysv + os=sysv ;; *-highlevel) - os=-bsd + os=bsd ;; *-encore) - os=-bsd + os=bsd ;; *-sgi) - os=-irix + os=irix ;; *-siemens) - os=-sysv4 + os=sysv4 ;; *-masscomp) - os=-rtu + os=rtu ;; f30[01]-fujitsu | f700-fujitsu) - os=-uxpv + os=uxpv ;; *-rom68k) - os=-coff + os=coff ;; *-*bug) - os=-coff + os=coff ;; *-apple) - os=-macos + os=macos ;; *-atari*) - os=-mint + os=mint ;; + *-wrs) + os=vxworks + ;; *) - os=-none + os=none ;; esac fi @@ -1717,83 +1707,84 @@ # Here we handle the case where we know the os, and the CPU type, but not the # manufacturer. We pick the logical manufacturer. -vendor=unknown -case $basic_machine in - *-unknown) +case $vendor in + unknown) case $os in - -riscix*) + riscix*) vendor=acorn ;; - -sunos*) + sunos*) vendor=sun ;; - -cnk*|-aix*) + cnk*|-aix*) vendor=ibm ;; - -beos*) + beos*) vendor=be ;; - -hpux*) + hpux*) vendor=hp ;; - -mpeix*) + mpeix*) vendor=hp ;; - -hiux*) + hiux*) vendor=hitachi ;; - -unos*) + unos*) vendor=crds ;; - -dgux*) + dgux*) vendor=dg ;; - -luna*) + luna*) vendor=omron ;; - -genix*) + genix*) vendor=ns ;; - -mvs* | -opened*) + clix*) + vendor=intergraph + ;; + mvs* | opened*) vendor=ibm ;; - -os400*) + os400*) vendor=ibm ;; - -ptx*) + ptx*) vendor=sequent ;; - -tpf*) + tpf*) vendor=ibm ;; - -vxsim* | -vxworks* | -windiss*) + vxsim* | vxworks* | windiss*) vendor=wrs ;; - -aux*) + aux*) vendor=apple ;; - -hms*) + hms*) vendor=hitachi ;; - -mpw* | -macos*) + mpw* | macos*) vendor=apple ;; - -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) + *mint | mint[0-9]* | *MiNT | MiNT[0-9]*) vendor=atari ;; - -vos*) + vos*) vendor=stratus ;; esac - basic_machine=`echo "$basic_machine" | sed "s/unknown/$vendor/"` ;; esac -echo "$basic_machine$os" +echo "$cpu-$vendor-$os" exit # Local variables: -# eval: (add-hook 'write-file-functions 'time-stamp) +# eval: (add-hook 'before-save-hook 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" From rra at isc.org Mon Dec 17 15:07:57 2018 From: rra at isc.org (INN Commit) Date: Mon, 17 Dec 2018 07:07:57 -0800 (PST) Subject: INN commit: trunk/doc/pod (hacking.pod) Message-ID: <20181217150757.4882C67D59@hope.eyrie.org> Date: Monday, December 17, 2018 @ 07:07:56 Author: iulius Revision: 10317 HACKING: mention "make depend" and better explain where m4 files are in the libtool Debian package Modified: trunk/doc/pod/hacking.pod -------------+ hacking.pod | 49 +++++++++++++++++++++++++++++++++++-------------- 1 file changed, 35 insertions(+), 14 deletions(-) Modified: hacking.pod =================================================================== --- hacking.pod 2018-12-17 14:51:05 UTC (rev 10316) +++ hacking.pod 2018-12-17 15:07:56 UTC (rev 10317) @@ -69,16 +69,17 @@ The supporting files for B are in the F subdirectory, including the files F and F to determine the system name and F for libtool support. -The latter file comes from the Debian package of Libtool, available -from L (F is generated -in the F subdirectory after building the package with -for instance B); the canonical versions of the former two -files are available from L (which currently +The latter file comes from the Debian package of Libtool, available from +L (F is generated in the +F subdirectory after building the package with for instance +B); the canonical versions of the former two files +are available from L (which currently redirects to L). -In addition, F and a few others m4 files used by INN are -just a copy of the corresponding files in the F subdirectory -of the Debian package of the libtool distribution. (Using libtool -without using B requires a few odd hacks.) New versions +In addition, F and a few others m4 files used +by INN are just a copy of the corresponding files in the +F subdirectory of the Debian +package of the libtool distribution. (Using libtool without +using B requires a few odd hacks.) New versions should be checked in periodically when available. There are no INN-specific modifications to those files except for F which recognizes the additional B<-B> flag that INN's B @@ -722,6 +723,7 @@ Also build INN (including the F and F directories) with warnings on (C) and run the test suite (C). +Fix any errors. =item 3. @@ -769,12 +771,31 @@ =item 8. -Check out a copy of the release branch. It's currently necessary to run -C and C to generate F. Then, run -C to generate all necessary files. Afterwards, run -C. There shouldn't be any differences; otherwise, -fix the F file. +Check out a copy of the release branch, and perform the following actions. +=over 2 + +=item * + +Run C and C that are currently necessary to generate +F. + +=item * + +Then, run C to generate all necessary files. + +=item * + +Run C to ensure dependencies are properly defined in all +INN makefiles. + +=item * + +Afterwards, run C. There shouldn't be any +differences; otherwise, fix the F file. + +=back + =item 9. Run C for a final release, C for From rra at isc.org Mon Dec 17 15:08:38 2018 From: rra at isc.org (INN Commit) Date: Mon, 17 Dec 2018 07:08:38 -0800 (PST) Subject: INN commit: trunk (m4/libtool.m4 support/ltmain.sh) Message-ID: <20181217150838.0B21267D59@hope.eyrie.org> Date: Monday, December 17, 2018 @ 07:08:37 Author: iulius Revision: 10318 Update libtool from upstream 2.4.6-6 Debian version Modified: trunk/m4/libtool.m4 trunk/support/ltmain.sh -------------------+ m4/libtool.m4 | 15 +- support/ltmain.sh | 281 +++++++++++++++++++++++++++++++++++++++------------- 2 files changed, 219 insertions(+), 77 deletions(-) Modified: m4/libtool.m4 =================================================================== --- m4/libtool.m4 2018-12-17 15:07:56 UTC (rev 10317) +++ m4/libtool.m4 2018-12-17 15:08:37 UTC (rev 10318) @@ -4063,7 +4063,8 @@ if AC_TRY_EVAL(ac_compile); then # Now try to grab the symbols. nlist=conftest.nm - if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then + $ECHO "$as_me:$LINENO: $NM conftest.$ac_objext | $lt_cv_sys_global_symbol_pipe > $nlist" >&AS_MESSAGE_LOG_FD + if eval "$NM" conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist 2>&AS_MESSAGE_LOG_FD && test -s "$nlist"; then # Try sorting and uniquifying the output. if sort "$nlist" | uniq > "$nlist"T; then mv -f "$nlist"T "$nlist" @@ -6438,7 +6439,7 @@ # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " \-L"' else GXX=no @@ -6813,7 +6814,7 @@ # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. - output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' + output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP " \-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test yes = "$GXX"; then @@ -6878,7 +6879,7 @@ # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. - output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' + output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP " \-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test yes = "$GXX"; then @@ -7217,7 +7218,7 @@ # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " \-L"' else # FIXME: insert proper C++ library support @@ -7301,7 +7302,7 @@ # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " \-L"' else # g++ 2.7 appears to require '-G' NOT '-shared' on this # platform. @@ -7312,7 +7313,7 @@ # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. - output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' + output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " \-L"' fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $wl$libdir' Modified: support/ltmain.sh =================================================================== --- support/ltmain.sh 2018-12-17 15:07:56 UTC (rev 10317) +++ support/ltmain.sh 2018-12-17 15:08:37 UTC (rev 10318) @@ -39,7 +39,7 @@ PROGRAM=libtool PACKAGE=libtool -VERSION="2.4.6 Debian-2.4.6-2" +VERSION="2.4.6 Debian-2.4.6-6" package_revision=2.4.6 @@ -72,7 +72,7 @@ # libraries, which are installed to $pkgauxdir. # Set a version string for this script. -scriptversion=2015-01-20.17; # UTC +scriptversion=2015-10-04.22; # UTC # General shell script boiler plate, and helper functions. # Written by Gary V. Vaughan, 2004 @@ -1099,6 +1099,57 @@ } +# func_quote ARG +# -------------- +# Aesthetically quote one ARG, store the result into $func_quote_result. Note +# that we keep attention to performance here (so far O(N) complexity as long as +# func_append is O(1)). +func_quote () +{ + $debug_cmd + + func_quote_result=$1 + + case $func_quote_result in + *[\\\`\"\$]*) + case $func_quote_result in + *[\[\*\?]*) + func_quote_result=`$ECHO "$func_quote_result" | $SED "$sed_quote_subst"` + return 0 + ;; + esac + + func_quote_old_IFS=$IFS + for _G_char in '\' '`' '"' '$' + do + # STATE($1) PREV($2) SEPARATOR($3) + set start "" "" + func_quote_result=dummy"$_G_char$func_quote_result$_G_char"dummy + IFS=$_G_char + for _G_part in $func_quote_result + do + case $1 in + quote) + func_append func_quote_result "$3$2" + set quote "$_G_part" "\\$_G_char" + ;; + start) + set first "" "" + func_quote_result= + ;; + first) + set quote "$_G_part" "" + ;; + esac + done + IFS=$func_quote_old_IFS + done + ;; + *) ;; + esac +} + + # func_quote_for_eval ARG... # -------------------------- # Aesthetically quote ARGs to be evaled later. @@ -1115,12 +1166,8 @@ func_quote_for_eval_unquoted_result= func_quote_for_eval_result= while test 0 -lt $#; do - case $1 in - *[\\\`\"\$]*) - _G_unquoted_arg=`printf '%s\n' "$1" |$SED "$sed_quote_subst"` ;; - *) - _G_unquoted_arg=$1 ;; - esac + func_quote "$1" + _G_unquoted_arg=$func_quote_result if test -n "$func_quote_for_eval_unquoted_result"; then func_append func_quote_for_eval_unquoted_result " $_G_unquoted_arg" else @@ -1378,7 +1425,7 @@ #! /bin/sh # Set a version string for this script. -scriptversion=2014-01-07.03; # UTC +scriptversion=2015-10-07.11; # UTC # A portable, pluggable option parser for Bourne shell. # Written by Gary V. Vaughan, 2010 @@ -1538,6 +1585,8 @@ { $debug_cmd + _G_rc_run_hooks=false + case " $hookable_fns " in *" $1 "*) ;; *) func_fatal_error "'$1' does not support hook funcions.n" ;; @@ -1546,16 +1595,16 @@ eval _G_hook_fns=\$$1_hooks; shift for _G_hook in $_G_hook_fns; do - eval $_G_hook '"$@"' - - # store returned options list back into positional - # parameters for next 'cmd' execution. - eval _G_hook_result=\$${_G_hook}_result - eval set dummy "$_G_hook_result"; shift + if eval $_G_hook '"$@"'; then + # store returned options list back into positional + # parameters for next 'cmd' execution. + eval _G_hook_result=\$${_G_hook}_result + eval set dummy "$_G_hook_result"; shift + _G_rc_run_hooks=: + fi done - func_quote_for_eval ${1+"$@"} - func_run_hooks_result=$func_quote_for_eval_result + $_G_rc_run_hooks && func_run_hooks_result=$_G_hook_result } @@ -1565,11 +1614,17 @@ ## --------------- ## # In order to add your own option parsing hooks, you must accept the -# full positional parameter list in your hook function, remove any -# options that you action, and then pass back the remaining unprocessed +# full positional parameter list in your hook function, you may remove/edit +# any options that you action, and then pass back the remaining unprocessed # options in '_result', escaped suitably for -# 'eval'. Like this: +# 'eval'. In this case you also must return $EXIT_SUCCESS to let the +# hook's caller know that it should pay attention to +# '_result'. Returning $EXIT_FAILURE signalizes that +# arguments are left untouched by the hook and therefore caller will ignore the +# result variable. # +# Like this: +# # my_options_prep () # { # $debug_cmd @@ -1578,9 +1633,11 @@ # usage_message=$usage_message' # -s, --silent don'\''t print informational messages # ' -# -# func_quote_for_eval ${1+"$@"} -# my_options_prep_result=$func_quote_for_eval_result +# # No change in '$@' (ignored completely by this hook). There is +# # no need to do the equivalent (but slower) action: +# # func_quote_for_eval ${1+"$@"} +# # my_options_prep_result=$func_quote_for_eval_result +# false # } # func_add_hook func_options_prep my_options_prep # @@ -1589,6 +1646,8 @@ # { # $debug_cmd # +# args_changed=false +# # # Note that for efficiency, we parse as many options as we can # # recognise in a loop before passing the remainder back to the # # caller on the first unrecognised argument we encounter. @@ -1595,19 +1654,29 @@ # while test $# -gt 0; do # opt=$1; shift # case $opt in -# --silent|-s) opt_silent=: ;; +# --silent|-s) opt_silent=: +# args_changed=: +# ;; # # Separate non-argument short options: # -s*) func_split_short_opt "$_G_opt" # set dummy "$func_split_short_opt_name" \ # "-$func_split_short_opt_arg" ${1+"$@"} # shift +# args_changed=: # ;; -# *) set dummy "$_G_opt" "$*"; shift; break ;; +# *) # Make sure the first unrecognised option "$_G_opt" +# # is added back to "$@", we could need that later +# # if $args_changed is true. +# set dummy "$_G_opt" ${1+"$@"}; shift; break ;; # esac # done # -# func_quote_for_eval ${1+"$@"} -# my_silent_option_result=$func_quote_for_eval_result +# if $args_changed; then +# func_quote_for_eval ${1+"$@"} +# my_silent_option_result=$func_quote_for_eval_result +# fi +# +# $args_changed # } # func_add_hook func_parse_options my_silent_option # @@ -1619,16 +1688,32 @@ # $opt_silent && $opt_verbose && func_fatal_help "\ # '--silent' and '--verbose' options are mutually exclusive." # -# func_quote_for_eval ${1+"$@"} -# my_option_validation_result=$func_quote_for_eval_result +# false # } # func_add_hook func_validate_options my_option_validation # -# You'll alse need to manually amend $usage_message to reflect the extra +# You'll also need to manually amend $usage_message to reflect the extra # options you parse. It's preferable to append if you can, so that # multiple option parsing hooks can be added safely. +# func_options_finish [ARG]... +# ---------------------------- +# Finishing the option parse loop (call 'func_options' hooks ATM). +func_options_finish () +{ + $debug_cmd + + _G_func_options_finish_exit=false + if func_run_hooks func_options ${1+"$@"}; then + func_options_finish_result=$func_run_hooks_result + _G_func_options_finish_exit=: + fi + + $_G_func_options_finish_exit +} + + # func_options [ARG]... # --------------------- # All the functions called inside func_options are hookable. See the @@ -1638,17 +1723,28 @@ { $debug_cmd - func_options_prep ${1+"$@"} - eval func_parse_options \ - ${func_options_prep_result+"$func_options_prep_result"} - eval func_validate_options \ - ${func_parse_options_result+"$func_parse_options_result"} + _G_rc_options=false - eval func_run_hooks func_options \ - ${func_validate_options_result+"$func_validate_options_result"} + for my_func in options_prep parse_options validate_options options_finish + do + if eval func_$my_func '${1+"$@"}'; then + eval _G_res_var='$'"func_${my_func}_result" + eval set dummy "$_G_res_var" ; shift + _G_rc_options=: + fi + done - # save modified positional parameters for caller - func_options_result=$func_run_hooks_result + # Save modified positional parameters for caller. As a top-level + # options-parser function we always need to set the 'func_options_result' + # variable (regardless the $_G_rc_options value). + if $_G_rc_options; then + func_options_result=$_G_res_var + else + func_quote_for_eval ${1+"$@"} + func_options_result=$func_quote_for_eval_result + fi + + $_G_rc_options } @@ -1657,9 +1753,9 @@ # All initialisations required before starting the option parse loop. # Note that when calling hook functions, we pass through the list of # positional parameters. If a hook function modifies that list, and -# needs to propogate that back to rest of this script, then the complete +# needs to propagate that back to rest of this script, then the complete # modified list must be put in 'func_run_hooks_result' before -# returning. +# returning $EXIT_SUCCESS (otherwise $EXIT_FAILURE is returned). func_hookable func_options_prep func_options_prep () { @@ -1669,10 +1765,14 @@ opt_verbose=false opt_warning_types= - func_run_hooks func_options_prep ${1+"$@"} + _G_rc_options_prep=false + if func_run_hooks func_options_prep ${1+"$@"}; then + _G_rc_options_prep=: + # save modified positional parameters for caller + func_options_prep_result=$func_run_hooks_result + fi - # save modified positional parameters for caller - func_options_prep_result=$func_run_hooks_result + $_G_rc_options_prep } @@ -1686,18 +1786,20 @@ func_parse_options_result= + _G_rc_parse_options=false # this just eases exit handling while test $# -gt 0; do # Defer to hook functions for initial option parsing, so they # get priority in the event of reusing an option name. - func_run_hooks func_parse_options ${1+"$@"} + if func_run_hooks func_parse_options ${1+"$@"}; then + eval set dummy "$func_run_hooks_result"; shift + _G_rc_parse_options=: + fi - # Adjust func_parse_options positional parameters to match - eval set dummy "$func_run_hooks_result"; shift - # Break out of the loop if we already parsed every option. test $# -gt 0 || break + _G_match_parse_options=: _G_opt=$1 shift case $_G_opt in @@ -1712,7 +1814,10 @@ ;; --warnings|--warning|-W) - test $# = 0 && func_missing_arg $_G_opt && break + if test $# = 0 && func_missing_arg $_G_opt; then + _G_rc_parse_options=: + break + fi case " $warning_categories $1" in *" $1 "*) # trailing space prevents matching last $1 above @@ -1765,15 +1870,25 @@ shift ;; - --) break ;; + --) _G_rc_parse_options=: ; break ;; -*) func_fatal_help "unrecognised option: '$_G_opt'" ;; - *) set dummy "$_G_opt" ${1+"$@"}; shift; break ;; + *) set dummy "$_G_opt" ${1+"$@"}; shift + _G_match_parse_options=false + break + ;; esac + + $_G_match_parse_options && _G_rc_parse_options=: done - # save modified positional parameters for caller - func_quote_for_eval ${1+"$@"} - func_parse_options_result=$func_quote_for_eval_result + + if $_G_rc_parse_options; then + # save modified positional parameters for caller + func_quote_for_eval ${1+"$@"} + func_parse_options_result=$func_quote_for_eval_result + fi + + $_G_rc_parse_options } @@ -1786,16 +1901,21 @@ { $debug_cmd + _G_rc_validate_options=false + # Display all warnings if -W was not given. test -n "$opt_warning_types" || opt_warning_types=" $warning_categories" - func_run_hooks func_validate_options ${1+"$@"} + if func_run_hooks func_validate_options ${1+"$@"}; then + # save modified positional parameters for caller + func_validate_options_result=$func_run_hooks_result + _G_rc_validate_options=: + fi # Bail if the options were screwed! $exit_cmd $EXIT_FAILURE - # save modified positional parameters for caller - func_validate_options_result=$func_run_hooks_result + $_G_rc_validate_options } @@ -2076,7 +2196,7 @@ compiler: $LTCC compiler flags: $LTCFLAGS linker: $LD (gnu? $with_gnu_ld) - version: $progname $scriptversion Debian-2.4.6-2 + version: $progname $scriptversion Debian-2.4.6-6 automake: `($AUTOMAKE --version) 2>/dev/null |$SED 1q` autoconf: `($AUTOCONF --version) 2>/dev/null |$SED 1q` @@ -2278,6 +2398,8 @@ nonopt= preserve_args= + _G_rc_lt_options_prep=: + # Shorthand for --mode=foo, only valid as the first argument case $1 in clean|clea|cle|cl) @@ -2301,11 +2423,18 @@ uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u) shift; set dummy --mode uninstall ${1+"$@"}; shift ;; + *) + _G_rc_lt_options_prep=false + ;; esac - # Pass back the list of options. - func_quote_for_eval ${1+"$@"} - libtool_options_prep_result=$func_quote_for_eval_result + if $_G_rc_lt_options_prep; then + # Pass back the list of options. + func_quote_for_eval ${1+"$@"} + libtool_options_prep_result=$func_quote_for_eval_result + fi + + $_G_rc_lt_options_prep } func_add_hook func_options_prep libtool_options_prep @@ -2317,9 +2446,12 @@ { $debug_cmd + _G_rc_lt_parse_options=false + # Perform our own loop to consume as many options as possible in # each iteration. while test $# -gt 0; do + _G_match_lt_parse_options=: _G_opt=$1 shift case $_G_opt in @@ -2394,15 +2526,22 @@ func_append preserve_args " $_G_opt" ;; - # An option not handled by this hook function: - *) set dummy "$_G_opt" ${1+"$@"}; shift; break ;; + # An option not handled by this hook function: + *) set dummy "$_G_opt" ${1+"$@"} ; shift + _G_match_lt_parse_options=false + break + ;; esac + $_G_match_lt_parse_options && _G_rc_lt_parse_options=: done + if $_G_rc_lt_parse_options; then + # save modified positional parameters for caller + func_quote_for_eval ${1+"$@"} + libtool_parse_options_result=$func_quote_for_eval_result + fi - # save modified positional parameters for caller - func_quote_for_eval ${1+"$@"} - libtool_parse_options_result=$func_quote_for_eval_result + $_G_rc_lt_parse_options } func_add_hook func_parse_options libtool_parse_options @@ -5267,7 +5406,8 @@ if test \"\$libtool_execute_magic\" != \"$magic\"; then file=\"\$0\"" - qECHO=`$ECHO "$ECHO" | $SED "$sed_quote_subst"` + func_quote "$ECHO" + qECHO=$func_quote_result $ECHO "\ # A function that is used when there is no print builtin or printf. @@ -10524,8 +10664,8 @@ relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command" fi done - relink_command="(cd `pwd`; $relink_command)" - relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"` + func_quote "(cd `pwd`; $relink_command)" + relink_command=$func_quote_result fi # Only actually do things if not in dry run mode. @@ -10771,7 +10911,8 @@ done # Quote the link command for shipping. relink_command="(cd `pwd`; $SHELL \"$progpath\" $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)" - relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"` + func_quote "$relink_command" + relink_command=$func_quote_result if test yes = "$hardcode_automatic"; then relink_command= fi From rra at isc.org Sat Dec 29 13:39:57 2018 From: rra at isc.org (INN Commit) Date: Sat, 29 Dec 2018 05:39:57 -0800 (PST) Subject: INN commit: trunk (3 files) Message-ID: <20181229133957.4496F67D78@hope.eyrie.org> Date: Saturday, December 29, 2018 @ 05:39:56 Author: iulius Revision: 10319 nnrpd: improve logging of failed connections Properly logs the hostname of clients whose connection failed owing to an issue during the negotiation of a TLS session or high load average. Nothing was previously logged. Thanks to Paolo Amoroso for the bug report. Modified: trunk/doc/pod/news.pod trunk/nnrpd/nnrpd.c trunk/scripts/innreport_inn.pm --------------------------+ doc/pod/news.pod | 6 ++++++ nnrpd/nnrpd.c | 23 ++++++++++++++--------- scripts/innreport_inn.pm | 3 ++- 3 files changed, 22 insertions(+), 10 deletions(-) Modified: doc/pod/news.pod =================================================================== --- doc/pod/news.pod 2018-12-17 15:08:37 UTC (rev 10318) +++ doc/pod/news.pod 2018-12-29 13:39:56 UTC (rev 10319) @@ -45,6 +45,12 @@ the reason in response to CHECK and TAKETHIS commands. Previously, the reason was given only for the IHAVE command. +=item * + +B now properly logs the hostname of clients whose connection +failed owing to an issue during the negotiation of a TLS session or +high load average. + =back =head1 Changes in 2.6.2 Modified: nnrpd/nnrpd.c =================================================================== --- nnrpd/nnrpd.c 2018-12-17 15:08:37 UTC (rev 10318) +++ nnrpd/nnrpd.c 2018-12-29 13:39:56 UTC (rev 10319) @@ -580,10 +580,10 @@ /* -** Determine access rights of the client. +** Determine hostname and IP of the client, amongst other information. */ static void -StartConnection(unsigned short port) +GetClientInfo(unsigned short port) { static const char *default_host_error = "unknown error"; struct sockaddr_storage ssc, sss; @@ -668,10 +668,6 @@ #endif notice("%s (%s) connect - port %u", Client.host, Client.ip, port); - - PERMgetinitialaccess(NNRPACCESS); - PERMgetaccess(true); - PERMgetpermissions(); } @@ -1328,7 +1324,10 @@ if (initialSSL) { tls_init(); if (tls_start_servertls(0, 1) == -1) { - Reply("%d Encrypted TLS connection failed\r\n", NNTP_FAIL_TERMINATING); + GetClientInfo(ListenPort); + notice("%s failure to negotiate TLS session", Client.host); + Reply("%d Encrypted TLS connection failed\r\n", + NNTP_FAIL_TERMINATING); ExitWithStats(1, false); } encryption_layer_on = true; @@ -1351,7 +1350,9 @@ warn("cannot obtain system load"); else { if ((unsigned long)(load[0] + 0.5) > innconf->nnrpdloadlimit) { - syslog(L_NOTICE, "load %.2f > %lu", load[0], innconf->nnrpdloadlimit); + GetClientInfo(ListenPort); + notice("%s load %.2f > %lu", Client.host, + load[0], innconf->nnrpdloadlimit); Reply("%d load at %.2f, try later\r\n", NNTP_FAIL_TERMINATING, load[0]); ExitWithStats(1, true); @@ -1363,7 +1364,11 @@ xsignal(SIGPIPE, CatchPipe); /* Get permissions and see if we can talk to this client. */ - StartConnection(ListenPort); + GetClientInfo(ListenPort); + PERMgetinitialaccess(NNRPACCESS); + PERMgetaccess(true); + PERMgetpermissions(); + if (!PERMcanread && !PERMcanpost && !PERMneedauth) { syslog(L_NOTICE, "%s no_permission", Client.host); Reply("%d You have no permission to talk. Goodbye!\r\n", Modified: scripts/innreport_inn.pm =================================================================== --- scripts/innreport_inn.pm 2018-12-17 15:08:37 UTC (rev 10318) +++ scripts/innreport_inn.pm 2018-12-29 13:39:56 UTC (rev 10319) @@ -1705,12 +1705,13 @@ } # can't getpeername if ($left =~ /\? can\'t getpeername/o) { - # $nnrpd_getpeername++; $nnrpd_gethostbyaddr{"? (can't getpeername)"}++; return 1; } # can't getsockname return 1 if $left =~ /^\S+ can\'t getsockname$/o; + # can't initialize TLS session + return 1 if $left =~ /^\S+ failure to negotiate TLS session$/o; # reverse lookup failed return 1 if $left =~ /^\? reverse lookup for \S+ failed: .* -- using IP address for access$/o; # profile timer From rra at isc.org Sat Dec 29 13:46:29 2018 From: rra at isc.org (INN Commit) Date: Sat, 29 Dec 2018 05:46:29 -0800 (PST) Subject: INN commit: branches/2.6 (3 files) Message-ID: <20181229134629.32DA367D78@hope.eyrie.org> Date: Saturday, December 29, 2018 @ 05:46:28 Author: iulius Revision: 10320 nnrpd: improve logging of failed connections Properly logs the hostname of clients whose connection failed owing to an issue during the negotiation of a TLS session or high load average. Nothing was previously logged. Thanks to Paolo Amoroso for the bug report. Modified: branches/2.6/doc/pod/news.pod branches/2.6/nnrpd/nnrpd.c branches/2.6/scripts/innreport_inn.pm --------------------------+ doc/pod/news.pod | 6 ++++++ nnrpd/nnrpd.c | 23 ++++++++++++++--------- scripts/innreport_inn.pm | 3 ++- 3 files changed, 22 insertions(+), 10 deletions(-) Modified: doc/pod/news.pod =================================================================== --- doc/pod/news.pod 2018-12-29 13:39:56 UTC (rev 10319) +++ doc/pod/news.pod 2018-12-29 13:46:28 UTC (rev 10320) @@ -45,6 +45,12 @@ the reason in response to CHECK and TAKETHIS commands. Previously, the reason was given only for the IHAVE command. +=item * + +B now properly logs the hostname of clients whose connection +failed owing to an issue during the negotiation of a TLS session or +high load average. + =back =head1 Changes in 2.6.2 Modified: nnrpd/nnrpd.c =================================================================== --- nnrpd/nnrpd.c 2018-12-29 13:39:56 UTC (rev 10319) +++ nnrpd/nnrpd.c 2018-12-29 13:46:28 UTC (rev 10320) @@ -578,10 +578,10 @@ /* -** Determine access rights of the client. +** Determine hostname and IP of the client, amongst other information. */ static void -StartConnection(unsigned short port) +GetClientInfo(unsigned short port) { static const char *default_host_error = "unknown error"; struct sockaddr_storage ssc, sss; @@ -666,10 +666,6 @@ #endif notice("%s (%s) connect - port %u", Client.host, Client.ip, port); - - PERMgetinitialaccess(NNRPACCESS); - PERMgetaccess(true); - PERMgetpermissions(); } @@ -1326,7 +1322,10 @@ if (initialSSL) { tls_init(); if (tls_start_servertls(0, 1) == -1) { - Reply("%d Encrypted TLS connection failed\r\n", NNTP_FAIL_TERMINATING); + GetClientInfo(ListenPort); + notice("%s failure to negotiate TLS session", Client.host); + Reply("%d Encrypted TLS connection failed\r\n", + NNTP_FAIL_TERMINATING); ExitWithStats(1, false); } encryption_layer_on = true; @@ -1349,7 +1348,9 @@ warn("cannot obtain system load"); else { if ((unsigned long)(load[0] + 0.5) > innconf->nnrpdloadlimit) { - syslog(L_NOTICE, "load %.2f > %lu", load[0], innconf->nnrpdloadlimit); + GetClientInfo(ListenPort); + notice("%s load %.2f > %lu", Client.host, + load[0], innconf->nnrpdloadlimit); Reply("%d load at %.2f, try later\r\n", NNTP_FAIL_TERMINATING, load[0]); ExitWithStats(1, true); @@ -1361,7 +1362,11 @@ xsignal(SIGPIPE, CatchPipe); /* Get permissions and see if we can talk to this client. */ - StartConnection(ListenPort); + GetClientInfo(ListenPort); + PERMgetinitialaccess(NNRPACCESS); + PERMgetaccess(true); + PERMgetpermissions(); + if (!PERMcanread && !PERMcanpost && !PERMneedauth) { syslog(L_NOTICE, "%s no_permission", Client.host); Reply("%d You have no permission to talk. Goodbye!\r\n", Modified: scripts/innreport_inn.pm =================================================================== --- scripts/innreport_inn.pm 2018-12-29 13:39:56 UTC (rev 10319) +++ scripts/innreport_inn.pm 2018-12-29 13:46:28 UTC (rev 10320) @@ -1705,12 +1705,13 @@ } # can't getpeername if ($left =~ /\? can\'t getpeername/o) { - # $nnrpd_getpeername++; $nnrpd_gethostbyaddr{"? (can't getpeername)"}++; return 1; } # can't getsockname return 1 if $left =~ /^\S+ can\'t getsockname$/o; + # can't initialize TLS session + return 1 if $left =~ /^\S+ failure to negotiate TLS session$/o; # reverse lookup failed return 1 if $left =~ /^\? reverse lookup for \S+ failed: .* -- using IP address for access$/o; # profile timer From rra at isc.org Sat Dec 29 13:47:15 2018 From: rra at isc.org (INN Commit) Date: Sat, 29 Dec 2018 05:47:15 -0800 (PST) Subject: INN commit: branches/2.6 (3 files) Message-ID: <20181229134715.36F3D67D78@hope.eyrie.org> Date: Saturday, December 29, 2018 @ 05:47:14 Author: iulius Revision: 10321 Bump version information for our libraries released with INN 2.6.3 A few interfaces have changed in libinn (fqdn function, and new innconf parameter). Modified: branches/2.6/history/Makefile branches/2.6/lib/Makefile branches/2.6/storage/Makefile ------------------+ history/Makefile | 2 +- lib/Makefile | 2 +- storage/Makefile | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) Modified: history/Makefile =================================================================== --- history/Makefile 2018-12-29 13:46:28 UTC (rev 10320) +++ history/Makefile 2018-12-29 13:47:14 UTC (rev 10321) @@ -8,7 +8,7 @@ # recover from make update. We can't use .OLD extensions for the shared # library since ldconfig will think .OLD sorts after the regular library and # will point the binaries at the old library. -LTVERSION = 3:2:0 +LTVERSION = 3:3:0 top = .. CFLAGS = $(GCFLAGS) -I. Modified: lib/Makefile =================================================================== --- lib/Makefile 2018-12-29 13:46:28 UTC (rev 10320) +++ lib/Makefile 2018-12-29 13:47:14 UTC (rev 10321) @@ -8,7 +8,7 @@ # recover from make update. We can't use .OLD extensions for the shared # library since ldconfig will think .OLD sorts after the regular library and # will point the binaries at the old library. -LTVERSION = 5:0:0 +LTVERSION = 6:0:0 top = .. CFLAGS = $(GCFLAGS) Modified: storage/Makefile =================================================================== --- storage/Makefile 2018-12-29 13:46:28 UTC (rev 10320) +++ storage/Makefile 2018-12-29 13:47:14 UTC (rev 10321) @@ -8,7 +8,7 @@ # recover from make update. We can't use .OLD extensions for the shared # library since ldconfig will think .OLD sorts after the regular library and # will point the binaries at the old library. -LTVERSION = 3:2:0 +LTVERSION = 3:3:0 top = .. CFLAGS = $(GCFLAGS) -I. $(BDB_CPPFLAGS) From rra at isc.org Sat Dec 29 13:47:44 2018 From: rra at isc.org (INN Commit) Date: Sat, 29 Dec 2018 05:47:44 -0800 (PST) Subject: INN commit: branches/2.6/control (pgpverify.in) Message-ID: <20181229134744.6B3F067D78@hope.eyrie.org> Date: Saturday, December 29, 2018 @ 05:47:43 Author: iulius Revision: 10322 Update to latest pgpverify 1.30 The previous INN release was done before the official release of pgpverify 1.30; that's why a few comments differed. Modified: branches/2.6/control/pgpverify.in --------------+ pgpverify.in | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) Modified: pgpverify.in =================================================================== --- pgpverify.in 2018-12-29 13:47:14 UTC (rev 10321) +++ pgpverify.in 2018-12-29 13:47:43 UTC (rev 10322) @@ -17,9 +17,9 @@ # practice. # # Changes from 1.29 -> 1.30 -# -- Support for GnuPG's gpg binary (in addition to gpgv). Indeed, gpg -# still validates signatures made with weak digest algorithms like MD5 -# whereas current versions of gpgv no longer do. +# -- Support for GnuPG's gpg binary (in addition to gpgv). gpg (from +# GnuPG 1.x) still validates signatures made with weak digest +# algorithms like MD5 whereas current versions of gpgv no longer do. # # Changes from 1.28 -> 1.29 # -- Disambiguate numbered lists from description lists in POD to silent @@ -137,7 +137,9 @@ # Path to the GnuPG gpg binary, if you have GnuPG and don't want to use # gpgv. This will be used in preference to gpgv and PGP. If you have INN # and the script is able to successfully include your INN::Config module, -# the value of $INN::Config::gpg will override this. +# the value of $INN::Config::gpg will override this. On a recent Debian +# variant, use /usr/bin/gpg1 (from the gnupg1 package) if you want to +# support old signatures with MD5 digest algorithms. # $gpg = '/usr/local/bin/gpg'; # Path to the GnuPG gpgv binary, if you have GnuPG. If you do, this will From rra at isc.org Sat Dec 29 13:48:23 2018 From: rra at isc.org (INN Commit) Date: Sat, 29 Dec 2018 05:48:23 -0800 (PST) Subject: INN commit: branches/2.6/support (config.guess config.sub) Message-ID: <20181229134823.9E6F867D78@hope.eyrie.org> Date: Saturday, December 29, 2018 @ 05:48:23 Author: iulius Revision: 10323 Update to latest upstream config.guess and config.sub files Modified: branches/2.6/support/config.guess branches/2.6/support/config.sub --------------+ config.guess | 133 +-- config.sub | 2457 ++++++++++++++++++++++++++++----------------------------- 2 files changed, 1300 insertions(+), 1290 deletions(-) Modified: config.guess =================================================================== --- config.guess 2018-12-29 13:47:43 UTC (rev 10322) +++ config.guess 2018-12-29 13:48:23 UTC (rev 10323) @@ -2,7 +2,7 @@ # Attempt to guess a canonical system name. # Copyright 1992-2018 Free Software Foundation, Inc. -timestamp='2018-01-16' +timestamp='2018-12-07' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by @@ -84,8 +84,6 @@ exit 1 fi -trap 'exit 1' 1 2 15 - # CC_FOR_BUILD -- compiler used by this script. Note that the use of a # compiler to aid in system detection is discouraged as it requires # temporary files to be created and, as you can see below, it is a @@ -96,34 +94,38 @@ # Portable tmp directory creation inspired by the Autoconf team. -set_cc_for_build=' -trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; -trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; -: ${TMPDIR=/tmp} ; - { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || - { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || - { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || - { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; -dummy=$tmp/dummy ; -tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; -case $CC_FOR_BUILD,$HOST_CC,$CC in - ,,) echo "int x;" > "$dummy.c" ; - for c in cc gcc c89 c99 ; do - if ($c -c -o "$dummy.o" "$dummy.c") >/dev/null 2>&1 ; then - CC_FOR_BUILD="$c"; break ; - fi ; - done ; - if test x"$CC_FOR_BUILD" = x ; then - CC_FOR_BUILD=no_compiler_found ; - fi - ;; - ,,*) CC_FOR_BUILD=$CC ;; - ,*,*) CC_FOR_BUILD=$HOST_CC ;; -esac ; set_cc_for_build= ;' +tmp= +# shellcheck disable=SC2172 +trap 'test -z "$tmp" || rm -fr "$tmp"' 0 1 2 13 15 +set_cc_for_build() { + : "${TMPDIR=/tmp}" + # shellcheck disable=SC2039 + { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || + { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir "$tmp" 2>/dev/null) ; } || + { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir "$tmp" 2>/dev/null) && echo "Warning: creating insecure temp directory" >&2 ; } || + { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } + dummy=$tmp/dummy + case ${CC_FOR_BUILD-},${HOST_CC-},${CC-} in + ,,) echo "int x;" > "$dummy.c" + for driver in cc gcc c89 c99 ; do + if ($driver -c -o "$dummy.o" "$dummy.c") >/dev/null 2>&1 ; then + CC_FOR_BUILD="$driver" + break + fi + done + if test x"$CC_FOR_BUILD" = x ; then + CC_FOR_BUILD=no_compiler_found + fi + ;; + ,,*) CC_FOR_BUILD=$CC ;; + ,*,*) CC_FOR_BUILD=$HOST_CC ;; + esac +} + # This is needed to find uname on a Pyramid OSx when run in the BSD universe. # (ghazi at noc.rutgers.edu 1994-08-24) -if (test -f /.attbin/uname) >/dev/null 2>&1 ; then +if test -f /.attbin/uname ; then PATH=$PATH:/.attbin ; export PATH fi @@ -138,7 +140,7 @@ # We could probably try harder. LIBC=gnu - eval "$set_cc_for_build" + set_cc_for_build cat <<-EOF > "$dummy.c" #include #if defined(__UCLIBC__) @@ -150,6 +152,13 @@ #endif EOF eval "`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^LIBC' | sed 's, ,,g'`" + + # If ldd exists, use it to detect musl libc. + if command -v ldd >/dev/null && \ + ldd --version 2>&1 | grep -q ^musl + then + LIBC=musl + fi ;; esac @@ -192,7 +201,7 @@ os=netbsdelf ;; arm*|i386|m68k|ns32k|sh3*|sparc|vax) - eval "$set_cc_for_build" + set_cc_for_build if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ELF__ then @@ -230,7 +239,7 @@ # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: # contains redundant information, the shorter form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. - echo "$machine-${os}${release}${abi}" + echo "$machine-${os}${release}${abi-}" exit ;; *:Bitrig:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'` @@ -382,20 +391,15 @@ echo i386-pc-auroraux"$UNAME_RELEASE" exit ;; i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) - eval "$set_cc_for_build" - SUN_ARCH=i386 - # If there is a compiler, see if it is configured for 64-bit objects. - # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. - # This test works for both compilers. - if [ "$CC_FOR_BUILD" != no_compiler_found ]; then - if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ - (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ - grep IS_64BIT_ARCH >/dev/null - then - SUN_ARCH=x86_64 - fi - fi - echo "$SUN_ARCH"-pc-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`" + UNAME_REL="`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`" + case `isainfo -b` in + 32) + echo i386-pc-solaris2"$UNAME_REL" + ;; + 64) + echo x86_64-pc-solaris2"$UNAME_REL" + ;; + esac exit ;; sun4*:SunOS:6*:*) # According to config.sub, this is the proper way to canonicalize @@ -475,7 +479,7 @@ echo clipper-intergraph-clix"$UNAME_RELEASE" exit ;; mips:*:*:UMIPS | mips:*:*:RISCos) - eval "$set_cc_for_build" + set_cc_for_build sed 's/^ //' << EOF > "$dummy.c" #ifdef __cplusplus #include /* for printf() prototype */ @@ -572,7 +576,7 @@ exit ;; *:AIX:2:3) if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then - eval "$set_cc_for_build" + set_cc_for_build sed 's/^ //' << EOF > "$dummy.c" #include @@ -653,7 +657,7 @@ esac fi if [ "$HP_ARCH" = "" ]; then - eval "$set_cc_for_build" + set_cc_for_build sed 's/^ //' << EOF > "$dummy.c" #define _HPUX_SOURCE @@ -693,7 +697,7 @@ esac if [ "$HP_ARCH" = hppa2.0w ] then - eval "$set_cc_for_build" + set_cc_for_build # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler @@ -719,7 +723,7 @@ echo ia64-hp-hpux"$HPUX_REV" exit ;; 3050*:HI-UX:*:*) - eval "$set_cc_for_build" + set_cc_for_build sed 's/^ //' << EOF > "$dummy.c" #include int @@ -833,6 +837,17 @@ *:BSD/OS:*:*) echo "$UNAME_MACHINE"-unknown-bsdi"$UNAME_RELEASE" exit ;; + arm:FreeBSD:*:*) + UNAME_PROCESSOR=`uname -p` + set_cc_for_build + if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ + | grep -q __ARM_PCS_VFP + then + echo "${UNAME_PROCESSOR}"-unknown-freebsd"`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`"-gnueabi + else + echo "${UNAME_PROCESSOR}"-unknown-freebsd"`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`"-gnueabihf + fi + exit ;; *:FreeBSD:*:*) UNAME_PROCESSOR=`/usr/bin/uname -p` case "$UNAME_PROCESSOR" in @@ -874,7 +889,7 @@ echo "$UNAME_MACHINE"-pc-uwin exit ;; amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) - echo x86_64-unknown-cygwin + echo x86_64-pc-cygwin exit ;; prep*:SunOS:5.*:*) echo powerpcle-unknown-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`" @@ -887,8 +902,8 @@ # other systems with GNU libc and userland echo "$UNAME_MACHINE-unknown-`echo "$UNAME_SYSTEM" | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]"``echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`-$LIBC" exit ;; - i*86:Minix:*:*) - echo "$UNAME_MACHINE"-pc-minix + *:Minix:*:*) + echo "$UNAME_MACHINE"-unknown-minix exit ;; aarch64:Linux:*:*) echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" @@ -915,7 +930,7 @@ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; arm*:Linux:*:*) - eval "$set_cc_for_build" + set_cc_for_build if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_EABI__ then @@ -964,7 +979,7 @@ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; mips:Linux:*:* | mips64:Linux:*:*) - eval "$set_cc_for_build" + set_cc_for_build sed 's/^ //' << EOF > "$dummy.c" #undef CPU #undef ${UNAME_MACHINE} @@ -1278,7 +1293,7 @@ exit ;; *:Darwin:*:*) UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown - eval "$set_cc_for_build" + set_cc_for_build if test "$UNAME_PROCESSOR" = unknown ; then UNAME_PROCESSOR=powerpc fi @@ -1351,6 +1366,7 @@ # "uname -m" is not consistent, so use $cputype instead. 386 # is converted to i386 for consistency with other x86 # operating systems. + # shellcheck disable=SC2154 if test "$cputype" = 386; then UNAME_MACHINE=i386 else @@ -1407,6 +1423,9 @@ amd64:Isilon\ OneFS:*:*) echo x86_64-unknown-onefs exit ;; + *:Unleashed:*:*) + echo "$UNAME_MACHINE"-unknown-unleashed"$UNAME_RELEASE" + exit ;; esac echo "$0: unable to guess system type" >&2 @@ -1462,7 +1481,7 @@ exit 1 # Local variables: -# eval: (add-hook 'write-file-functions 'time-stamp) +# eval: (add-hook 'before-save-hook 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" Modified: config.sub =================================================================== --- config.sub 2018-12-29 13:47:43 UTC (rev 10322) +++ config.sub 2018-12-29 13:48:23 UTC (rev 10323) @@ -2,7 +2,7 @@ # Configuration validation subroutine script. # Copyright 1992-2018 Free Software Foundation, Inc. -timestamp='2018-01-15' +timestamp='2018-12-16' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by @@ -89,7 +89,7 @@ - ) # Use stdin as input. break ;; -* ) - echo "$me: invalid option $1$help" + echo "$me: invalid option $1$help" >&2 exit 1 ;; *local*) @@ -110,1223 +110,1160 @@ exit 1;; esac -# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). -# Here we must recognize all the valid KERNEL-OS combinations. -maybe_os=`echo "$1" | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` -case $maybe_os in - nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \ - linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \ - knetbsd*-gnu* | netbsd*-gnu* | netbsd*-eabi* | \ - kopensolaris*-gnu* | cloudabi*-eabi* | \ - storm-chaos* | os2-emx* | rtmk-nova*) - os=-$maybe_os - basic_machine=`echo "$1" | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` - ;; - android-linux) - os=-linux-android - basic_machine=`echo "$1" | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown - ;; - *) - basic_machine=`echo "$1" | sed 's/-[^-]*$//'` - if [ "$basic_machine" != "$1" ] - then os=`echo "$1" | sed 's/.*-/-/'` - else os=; fi - ;; -esac +# Split fields of configuration type +IFS="-" read field1 field2 field3 field4 <&2 + exit 1 ;; - -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ - -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ - -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ - -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ - -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ - -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ - -apple | -axis | -knuth | -cray | -microblaze*) - os= - basic_machine=$1 + *-*-*-*) + basic_machine=$field1-$field2 + os=$field3-$field4 ;; - -bluegene*) - os=-cnk + *-*-*) + # Ambiguous whether COMPANY is present, or skipped and KERNEL-OS is two + # parts + maybe_os=$field2-$field3 + case $maybe_os in + nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc \ + | linux-newlib* | linux-musl* | linux-uclibc* | uclinux-uclibc* \ + | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* \ + | netbsd*-eabi* | kopensolaris*-gnu* | cloudabi*-eabi* \ + | storm-chaos* | os2-emx* | rtmk-nova*) + basic_machine=$field1 + os=$maybe_os + ;; + android-linux) + basic_machine=$field1-unknown + os=linux-android + ;; + *) + basic_machine=$field1-$field2 + os=$field3 + ;; + esac ;; - -sim | -cisco | -oki | -wec | -winbond) - os= - basic_machine=$1 + *-*) + # A lone config we happen to match not fitting any pattern + case $field1-$field2 in + decstation-3100) + basic_machine=mips-dec + os= + ;; + *-*) + # Second component is usually, but not always the OS + case $field2 in + # Prevent following clause from handling this valid os + sun*os*) + basic_machine=$field1 + os=$field2 + ;; + # Manufacturers + dec* | mips* | sequent* | encore* | pc533* | sgi* | sony* \ + | att* | 7300* | 3300* | delta* | motorola* | sun[234]* \ + | unicom* | ibm* | next | hp | isi* | apollo | altos* \ + | convergent* | ncr* | news | 32* | 3600* | 3100* \ + | hitachi* | c[123]* | convex* | sun | crds | omron* | dg \ + | ultra | tti* | harris | dolphin | highlevel | gould \ + | cbm | ns | masscomp | apple | axis | knuth | cray \ + | microblaze* | sim | cisco \ + | oki | wec | wrs | winbond) + basic_machine=$field1-$field2 + os= + ;; + *) + basic_machine=$field1 + os=$field2 + ;; + esac + ;; + esac ;; - -scout) + *) + # Convert single-component short-hands not valid as part of + # multi-component configurations. + case $field1 in + 386bsd) + basic_machine=i386-pc + os=bsd + ;; + a29khif) + basic_machine=a29k-amd + os=udi + ;; + adobe68k) + basic_machine=m68010-adobe + os=scout + ;; + alliant) + basic_machine=fx80-alliant + os= + ;; + altos | altos3068) + basic_machine=m68k-altos + os= + ;; + am29k) + basic_machine=a29k-none + os=bsd + ;; + amdahl) + basic_machine=580-amdahl + os=sysv + ;; + amiga) + basic_machine=m68k-unknown + os= + ;; + amigaos | amigados) + basic_machine=m68k-unknown + os=amigaos + ;; + amigaunix | amix) + basic_machine=m68k-unknown + os=sysv4 + ;; + apollo68) + basic_machine=m68k-apollo + os=sysv + ;; + apollo68bsd) + basic_machine=m68k-apollo + os=bsd + ;; + aros) + basic_machine=i386-pc + os=aros + ;; + aux) + basic_machine=m68k-apple + os=aux + ;; + balance) + basic_machine=ns32k-sequent + os=dynix + ;; + blackfin) + basic_machine=bfin-unknown + os=linux + ;; + cegcc) + basic_machine=arm-unknown + os=cegcc + ;; + convex-c1) + basic_machine=c1-convex + os=bsd + ;; + convex-c2) + basic_machine=c2-convex + os=bsd + ;; + convex-c32) + basic_machine=c32-convex + os=bsd + ;; + convex-c34) + basic_machine=c34-convex + os=bsd + ;; + convex-c38) + basic_machine=c38-convex + os=bsd + ;; + cray) + basic_machine=j90-cray + os=unicos + ;; + crds | unos) + basic_machine=m68k-crds + os= + ;; + da30) + basic_machine=m68k-da30 + os= + ;; + decstation | pmax | pmin | dec3100 | decstatn) + basic_machine=mips-dec + os= + ;; + delta88) + basic_machine=m88k-motorola + os=sysv3 + ;; + dicos) + basic_machine=i686-pc + os=dicos + ;; + djgpp) + basic_machine=i586-pc + os=msdosdjgpp + ;; + ebmon29k) + basic_machine=a29k-amd + os=ebmon + ;; + es1800 | OSE68k | ose68k | ose | OSE) + basic_machine=m68k-ericsson + os=ose + ;; + gmicro) + basic_machine=tron-gmicro + os=sysv + ;; + go32) + basic_machine=i386-pc + os=go32 + ;; + h8300hms) + basic_machine=h8300-hitachi + os=hms + ;; + h8300xray) + basic_machine=h8300-hitachi + os=xray + ;; + h8500hms) + basic_machine=h8500-hitachi + os=hms + ;; + harris) + basic_machine=m88k-harris + os=sysv3 + ;; + hp300) + basic_machine=m68k-hp + ;; + hp300bsd) + basic_machine=m68k-hp + os=bsd + ;; + hp300hpux) + basic_machine=m68k-hp + os=hpux + ;; + hppaosf) + basic_machine=hppa1.1-hp + os=osf + ;; + hppro) + basic_machine=hppa1.1-hp + os=proelf + ;; + i386mach) + basic_machine=i386-mach + os=mach + ;; + vsta) + basic_machine=i386-pc + os=vsta + ;; + isi68 | isi) + basic_machine=m68k-isi + os=sysv + ;; + m68knommu) + basic_machine=m68k-unknown + os=linux + ;; + magnum | m3230) + basic_machine=mips-mips + os=sysv + ;; + merlin) + basic_machine=ns32k-utek + os=sysv + ;; + mingw64) + basic_machine=x86_64-pc + os=mingw64 + ;; + mingw32) + basic_machine=i686-pc + os=mingw32 + ;; + mingw32ce) + basic_machine=arm-unknown + os=mingw32ce + ;; + monitor) + basic_machine=m68k-rom68k + os=coff + ;; + morphos) + basic_machine=powerpc-unknown + os=morphos + ;; + moxiebox) + basic_machine=moxie-unknown + os=moxiebox + ;; + msdos) + basic_machine=i386-pc + os=msdos + ;; + msys) + basic_machine=i686-pc + os=msys + ;; + mvs) + basic_machine=i370-ibm + os=mvs + ;; + nacl) + basic_machine=le32-unknown + os=nacl + ;; + ncr3000) + basic_machine=i486-ncr + os=sysv4 + ;; + netbsd386) + basic_machine=i386-pc + os=netbsd + ;; + netwinder) + basic_machine=armv4l-rebel + os=linux + ;; + news | news700 | news800 | news900) + basic_machine=m68k-sony + os=newsos + ;; + news1000) + basic_machine=m68030-sony + os=newsos + ;; + necv70) + basic_machine=v70-nec + os=sysv + ;; + nh3000) + basic_machine=m68k-harris + os=cxux + ;; + nh[45]000) + basic_machine=m88k-harris + os=cxux + ;; + nindy960) + basic_machine=i960-intel + os=nindy + ;; + mon960) + basic_machine=i960-intel + os=mon960 + ;; + nonstopux) + basic_machine=mips-compaq + os=nonstopux + ;; + os400) + basic_machine=powerpc-ibm + os=os400 + ;; + OSE68000 | ose68000) + basic_machine=m68000-ericsson + os=ose + ;; + os68k) + basic_machine=m68k-none + os=os68k + ;; + paragon) + basic_machine=i860-intel + os=osf + ;; + parisc) + basic_machine=hppa-unknown + os=linux + ;; + pw32) + basic_machine=i586-unknown + os=pw32 + ;; + rdos | rdos64) + basic_machine=x86_64-pc + os=rdos + ;; + rdos32) + basic_machine=i386-pc + os=rdos + ;; + rom68k) + basic_machine=m68k-rom68k + os=coff + ;; + sa29200) + basic_machine=a29k-amd + os=udi + ;; + sei) + basic_machine=mips-sei + os=seiux + ;; + sequent) + basic_machine=i386-sequent + os= + ;; + sps7) + basic_machine=m68k-bull + os=sysv2 + ;; + st2000) + basic_machine=m68k-tandem + os= + ;; + stratus) + basic_machine=i860-stratus + os=sysv4 + ;; + sun2) + basic_machine=m68000-sun + os= + ;; + sun2os3) + basic_machine=m68000-sun + os=sunos3 + ;; + sun2os4) + basic_machine=m68000-sun + os=sunos4 + ;; + sun3) + basic_machine=m68k-sun + os= + ;; + sun3os3) + basic_machine=m68k-sun + os=sunos3 + ;; + sun3os4) + basic_machine=m68k-sun + os=sunos4 + ;; + sun4) + basic_machine=sparc-sun + os= + ;; + sun4os3) + basic_machine=sparc-sun + os=sunos3 + ;; + sun4os4) + basic_machine=sparc-sun + os=sunos4 + ;; + sun4sol2) + basic_machine=sparc-sun + os=solaris2 + ;; + sun386 | sun386i | roadrunner) + basic_machine=i386-sun + os= + ;; + sv1) + basic_machine=sv1-cray + os=unicos + ;; + symmetry) + basic_machine=i386-sequent + os=dynix + ;; + t3e) + basic_machine=alphaev5-cray + os=unicos + ;; + t90) + basic_machine=t90-cray + os=unicos + ;; + toad1) + basic_machine=pdp10-xkl + os=tops20 + ;; + tpf) + basic_machine=s390x-ibm + os=tpf + ;; + udi29k) + basic_machine=a29k-amd + os=udi + ;; + ultra3) + basic_machine=a29k-nyu + os=sym1 + ;; + v810 | necv810) + basic_machine=v810-nec + os=none + ;; + vaxv) + basic_machine=vax-dec + os=sysv + ;; + vms) + basic_machine=vax-dec + os=vms + ;; + vxworks960) + basic_machine=i960-wrs + os=vxworks + ;; + vxworks68) + basic_machine=m68k-wrs + os=vxworks + ;; + vxworks29k) + basic_machine=a29k-wrs + os=vxworks + ;; + xbox) + basic_machine=i686-pc + os=mingw32 + ;; + ymp) + basic_machine=ymp-cray + os=unicos + ;; + *) + basic_machine=$1 + os= + ;; + esac ;; - -wrs) - os=-vxworks - basic_machine=$1 - ;; - -chorusos*) - os=-chorusos - basic_machine=$1 - ;; - -chorusrdb) - os=-chorusrdb - basic_machine=$1 - ;; - -hiux*) - os=-hiuxwe2 - ;; - -sco6) - os=-sco5v6 - basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` - ;; - -sco5) - os=-sco3.2v5 - basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` - ;; - -sco4) - os=-sco3.2v4 - basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` - ;; - -sco3.2.[4-9]*) - os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` - basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` - ;; - -sco3.2v[4-9]*) - # Don't forget version if it is 3.2v4 or newer. - basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` - ;; - -sco5v6*) - # Don't forget version if it is 3.2v4 or newer. - basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` - ;; - -sco*) - os=-sco3.2v2 - basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` - ;; - -udk*) - basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` - ;; - -isc) - os=-isc2.2 - basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` - ;; - -clix*) - basic_machine=clipper-intergraph - ;; - -isc*) - basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` - ;; - -lynx*178) - os=-lynxos178 - ;; - -lynx*5) - os=-lynxos5 - ;; - -lynx*) - os=-lynxos - ;; - -ptx*) - basic_machine=`echo "$1" | sed -e 's/86-.*/86-sequent/'` - ;; - -psos*) - os=-psos - ;; - -mint | -mint[0-9]*) - basic_machine=m68k-atari - os=-mint - ;; esac -# Decode aliases for certain CPU-COMPANY combinations. +# Decode 1-component or ad-hoc basic machines case $basic_machine in - # Recognize the basic CPU types without company name. - # Some are omitted here because they have special meanings below. - 1750a | 580 \ - | a29k \ - | aarch64 | aarch64_be \ - | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ - | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ - | am33_2.0 \ - | arc | arceb \ - | arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \ - | avr | avr32 \ - | ba \ - | be32 | be64 \ - | bfin \ - | c4x | c8051 | clipper \ - | d10v | d30v | dlx | dsp16xx \ - | e2k | epiphany \ - | fido | fr30 | frv | ft32 \ - | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ - | hexagon \ - | i370 | i860 | i960 | ia16 | ia64 \ - | ip2k | iq2000 \ - | k1om \ - | le32 | le64 \ - | lm32 \ - | m32c | m32r | m32rle | m68000 | m68k | m88k \ - | maxq | mb | microblaze | microblazeel | mcore | mep | metag \ - | mips | mipsbe | mipseb | mipsel | mipsle \ - | mips16 \ - | mips64 | mips64el \ - | mips64octeon | mips64octeonel \ - | mips64orion | mips64orionel \ - | mips64r5900 | mips64r5900el \ - | mips64vr | mips64vrel \ - | mips64vr4100 | mips64vr4100el \ - | mips64vr4300 | mips64vr4300el \ - | mips64vr5000 | mips64vr5000el \ - | mips64vr5900 | mips64vr5900el \ - | mipsisa32 | mipsisa32el \ - | mipsisa32r2 | mipsisa32r2el \ - | mipsisa32r6 | mipsisa32r6el \ - | mipsisa64 | mipsisa64el \ - | mipsisa64r2 | mipsisa64r2el \ - | mipsisa64r6 | mipsisa64r6el \ - | mipsisa64sb1 | mipsisa64sb1el \ - | mipsisa64sr71k | mipsisa64sr71kel \ - | mipsr5900 | mipsr5900el \ - | mipstx39 | mipstx39el \ - | mn10200 | mn10300 \ - | moxie \ - | mt \ - | msp430 \ - | nds32 | nds32le | nds32be \ - | nios | nios2 | nios2eb | nios2el \ - | ns16k | ns32k \ - | open8 | or1k | or1knd | or32 \ - | pdp10 | pj | pjl \ - | powerpc | powerpc64 | powerpc64le | powerpcle \ - | pru \ - | pyramid \ - | riscv32 | riscv64 \ - | rl78 | rx \ - | score \ - | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[234]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ - | sh64 | sh64le \ - | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ - | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ - | spu \ - | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \ - | ubicom32 \ - | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \ - | visium \ - | wasm32 \ - | x86 | xc16x | xstormy16 | xtensa \ - | z8k | z80) - basic_machine=$basic_machine-unknown + # Here we handle the default manufacturer of certain CPU types. It is in + # some cases the only manufacturer, in others, it is the most popular. + w89k) + cpu=hppa1.1 + vendor=winbond ;; - c54x) - basic_machine=tic54x-unknown + op50n) + cpu=hppa1.1 + vendor=oki ;; - c55x) - basic_machine=tic55x-unknown + op60c) + cpu=hppa1.1 + vendor=oki ;; - c6x) - basic_machine=tic6x-unknown + ibm*) + cpu=i370 + vendor=ibm ;; - leon|leon[3-9]) - basic_machine=sparc-$basic_machine + orion105) + cpu=clipper + vendor=highlevel ;; - m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | nvptx | picochip) - basic_machine=$basic_machine-unknown - os=-none + mac | mpw | mac-mpw) + cpu=m68k + vendor=apple ;; - m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65) + pmac | pmac-mpw) + cpu=powerpc + vendor=apple ;; - ms1) - basic_machine=mt-unknown - ;; - strongarm | thumb | xscale) - basic_machine=arm-unknown - ;; - xgate) - basic_machine=$basic_machine-unknown - os=-none - ;; - xscaleeb) - basic_machine=armeb-unknown - ;; - - xscaleel) - basic_machine=armel-unknown - ;; - - # We use `pc' rather than `unknown' - # because (1) that's what they normally are, and - # (2) the word "unknown" tends to confuse beginning users. - i*86 | x86_64) - basic_machine=$basic_machine-pc - ;; - # Object if more than one company name word. - *-*-*) - echo Invalid configuration \`"$1"\': machine \`"$basic_machine"\' not recognized 1>&2 - exit 1 - ;; - # Recognize the basic CPU types with company name. - 580-* \ - | a29k-* \ - | aarch64-* | aarch64_be-* \ - | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ - | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ - | alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \ - | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ - | avr-* | avr32-* \ - | ba-* \ - | be32-* | be64-* \ - | bfin-* | bs2000-* \ - | c[123]* | c30-* | [cjt]90-* | c4x-* \ - | c8051-* | clipper-* | craynv-* | cydra-* \ - | d10v-* | d30v-* | dlx-* \ - | e2k-* | elxsi-* \ - | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ - | h8300-* | h8500-* \ - | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ - | hexagon-* \ - | i*86-* | i860-* | i960-* | ia16-* | ia64-* \ - | ip2k-* | iq2000-* \ - | k1om-* \ - | le32-* | le64-* \ - | lm32-* \ - | m32c-* | m32r-* | m32rle-* \ - | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ - | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \ - | microblaze-* | microblazeel-* \ - | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ - | mips16-* \ - | mips64-* | mips64el-* \ - | mips64octeon-* | mips64octeonel-* \ - | mips64orion-* | mips64orionel-* \ - | mips64r5900-* | mips64r5900el-* \ - | mips64vr-* | mips64vrel-* \ - | mips64vr4100-* | mips64vr4100el-* \ - | mips64vr4300-* | mips64vr4300el-* \ - | mips64vr5000-* | mips64vr5000el-* \ - | mips64vr5900-* | mips64vr5900el-* \ - | mipsisa32-* | mipsisa32el-* \ - | mipsisa32r2-* | mipsisa32r2el-* \ - | mipsisa32r6-* | mipsisa32r6el-* \ - | mipsisa64-* | mipsisa64el-* \ - | mipsisa64r2-* | mipsisa64r2el-* \ - | mipsisa64r6-* | mipsisa64r6el-* \ - | mipsisa64sb1-* | mipsisa64sb1el-* \ - | mipsisa64sr71k-* | mipsisa64sr71kel-* \ - | mipsr5900-* | mipsr5900el-* \ - | mipstx39-* | mipstx39el-* \ - | mmix-* \ - | mt-* \ - | msp430-* \ - | nds32-* | nds32le-* | nds32be-* \ - | nios-* | nios2-* | nios2eb-* | nios2el-* \ - | none-* | np1-* | ns16k-* | ns32k-* \ - | open8-* \ - | or1k*-* \ - | orion-* \ - | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ - | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \ - | pru-* \ - | pyramid-* \ - | riscv32-* | riscv64-* \ - | rl78-* | romp-* | rs6000-* | rx-* \ - | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ - | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ - | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ - | sparclite-* \ - | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx*-* \ - | tahoe-* \ - | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ - | tile*-* \ - | tron-* \ - | ubicom32-* \ - | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \ - | vax-* \ - | visium-* \ - | wasm32-* \ - | we32k-* \ - | x86-* | x86_64-* | xc16x-* | xps100-* \ - | xstormy16-* | xtensa*-* \ - | ymp-* \ - | z8k-* | z80-*) - ;; - # Recognize the basic CPU types without company name, with glob match. - xtensa*) - basic_machine=$basic_machine-unknown - ;; # Recognize the various machine names and aliases which stand # for a CPU type and a company and sometimes even an OS. - 386bsd) - basic_machine=i386-pc - os=-bsd - ;; 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) - basic_machine=m68000-att + cpu=m68000 + vendor=att ;; 3b*) - basic_machine=we32k-att + cpu=we32k + vendor=att ;; - a29khif) - basic_machine=a29k-amd - os=-udi - ;; - abacus) - basic_machine=abacus-unknown - ;; - adobe68k) - basic_machine=m68010-adobe - os=-scout - ;; - alliant | fx80) - basic_machine=fx80-alliant - ;; - altos | altos3068) - basic_machine=m68k-altos - ;; - am29k) - basic_machine=a29k-none - os=-bsd - ;; - amd64) - basic_machine=x86_64-pc - ;; - amd64-*) - basic_machine=x86_64-`echo "$basic_machine" | sed 's/^[^-]*-//'` - ;; - amdahl) - basic_machine=580-amdahl - os=-sysv - ;; - amiga | amiga-*) - basic_machine=m68k-unknown - ;; - amigaos | amigados) - basic_machine=m68k-unknown - os=-amigaos - ;; - amigaunix | amix) - basic_machine=m68k-unknown - os=-sysv4 - ;; - apollo68) - basic_machine=m68k-apollo - os=-sysv - ;; - apollo68bsd) - basic_machine=m68k-apollo - os=-bsd - ;; - aros) - basic_machine=i386-pc - os=-aros - ;; - asmjs) - basic_machine=asmjs-unknown - ;; - aux) - basic_machine=m68k-apple - os=-aux - ;; - balance) - basic_machine=ns32k-sequent - os=-dynix - ;; - blackfin) - basic_machine=bfin-unknown - os=-linux - ;; - blackfin-*) - basic_machine=bfin-`echo "$basic_machine" | sed 's/^[^-]*-//'` - os=-linux - ;; bluegene*) - basic_machine=powerpc-ibm - os=-cnk + cpu=powerpc + vendor=ibm + os=cnk ;; - c54x-*) - basic_machine=tic54x-`echo "$basic_machine" | sed 's/^[^-]*-//'` - ;; - c55x-*) - basic_machine=tic55x-`echo "$basic_machine" | sed 's/^[^-]*-//'` - ;; - c6x-*) - basic_machine=tic6x-`echo "$basic_machine" | sed 's/^[^-]*-//'` - ;; - c90) - basic_machine=c90-cray - os=-unicos - ;; - cegcc) - basic_machine=arm-unknown - os=-cegcc - ;; - convex-c1) - basic_machine=c1-convex - os=-bsd - ;; - convex-c2) - basic_machine=c2-convex - os=-bsd - ;; - convex-c32) - basic_machine=c32-convex - os=-bsd - ;; - convex-c34) - basic_machine=c34-convex - os=-bsd - ;; - convex-c38) - basic_machine=c38-convex - os=-bsd - ;; - cray | j90) - basic_machine=j90-cray - os=-unicos - ;; - craynv) - basic_machine=craynv-cray - os=-unicosmp - ;; - cr16 | cr16-*) - basic_machine=cr16-unknown - os=-elf - ;; - crds | unos) - basic_machine=m68k-crds - ;; - crisv32 | crisv32-* | etraxfs*) - basic_machine=crisv32-axis - ;; - cris | cris-* | etrax*) - basic_machine=cris-axis - ;; - crx) - basic_machine=crx-unknown - os=-elf - ;; - da30 | da30-*) - basic_machine=m68k-da30 - ;; - decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) - basic_machine=mips-dec - ;; decsystem10* | dec10*) - basic_machine=pdp10-dec - os=-tops10 + cpu=pdp10 + vendor=dec + os=tops10 ;; decsystem20* | dec20*) - basic_machine=pdp10-dec - os=-tops20 + cpu=pdp10 + vendor=dec + os=tops20 ;; delta | 3300 | motorola-3300 | motorola-delta \ | 3300-motorola | delta-motorola) - basic_machine=m68k-motorola + cpu=m68k + vendor=motorola ;; - delta88) - basic_machine=m88k-motorola - os=-sysv3 - ;; - dicos) - basic_machine=i686-pc - os=-dicos - ;; - djgpp) - basic_machine=i586-pc - os=-msdosdjgpp - ;; - dpx20 | dpx20-*) - basic_machine=rs6000-bull - os=-bosx - ;; dpx2*) - basic_machine=m68k-bull - os=-sysv3 + cpu=m68k + vendor=bull + os=sysv3 ;; - e500v[12]) - basic_machine=powerpc-unknown - os=$os"spe" + encore | umax | mmax) + cpu=ns32k + vendor=encore ;; - e500v[12]-*) - basic_machine=powerpc-`echo "$basic_machine" | sed 's/^[^-]*-//'` - os=$os"spe" - ;; - ebmon29k) - basic_machine=a29k-amd - os=-ebmon - ;; elxsi) - basic_machine=elxsi-elxsi - os=-bsd + cpu=elxsi + vendor=elxsi + os=${os:-bsd} ;; - encore | umax | mmax) - basic_machine=ns32k-encore - ;; - es1800 | OSE68k | ose68k | ose | OSE) - basic_machine=m68k-ericsson - os=-ose - ;; fx2800) - basic_machine=i860-alliant + cpu=i860 + vendor=alliant ;; genix) - basic_machine=ns32k-ns + cpu=ns32k + vendor=ns ;; - gmicro) - basic_machine=tron-gmicro - os=-sysv - ;; - go32) - basic_machine=i386-pc - os=-go32 - ;; h3050r* | hiux*) - basic_machine=hppa1.1-hitachi - os=-hiuxwe2 + cpu=hppa1.1 + vendor=hitachi + os=hiuxwe2 ;; - h8300hms) - basic_machine=h8300-hitachi - os=-hms - ;; - h8300xray) - basic_machine=h8300-hitachi - os=-xray - ;; - h8500hms) - basic_machine=h8500-hitachi - os=-hms - ;; - harris) - basic_machine=m88k-harris - os=-sysv3 - ;; - hp300-*) - basic_machine=m68k-hp - ;; - hp300bsd) - basic_machine=m68k-hp - os=-bsd - ;; - hp300hpux) - basic_machine=m68k-hp - os=-hpux - ;; hp3k9[0-9][0-9] | hp9[0-9][0-9]) - basic_machine=hppa1.0-hp + cpu=hppa1.0 + vendor=hp ;; hp9k2[0-9][0-9] | hp9k31[0-9]) - basic_machine=m68000-hp + cpu=m68000 + vendor=hp ;; hp9k3[2-9][0-9]) - basic_machine=m68k-hp + cpu=m68k + vendor=hp ;; hp9k6[0-9][0-9] | hp6[0-9][0-9]) - basic_machine=hppa1.0-hp + cpu=hppa1.0 + vendor=hp ;; hp9k7[0-79][0-9] | hp7[0-79][0-9]) - basic_machine=hppa1.1-hp + cpu=hppa1.1 + vendor=hp ;; hp9k78[0-9] | hp78[0-9]) # FIXME: really hppa2.0-hp - basic_machine=hppa1.1-hp + cpu=hppa1.1 + vendor=hp ;; hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) # FIXME: really hppa2.0-hp - basic_machine=hppa1.1-hp + cpu=hppa1.1 + vendor=hp ;; hp9k8[0-9][13679] | hp8[0-9][13679]) - basic_machine=hppa1.1-hp + cpu=hppa1.1 + vendor=hp ;; hp9k8[0-9][0-9] | hp8[0-9][0-9]) - basic_machine=hppa1.0-hp + cpu=hppa1.0 + vendor=hp ;; - hppaosf) - basic_machine=hppa1.1-hp - os=-osf - ;; - hppro) - basic_machine=hppa1.1-hp - os=-proelf - ;; - i370-ibm* | ibm*) - basic_machine=i370-ibm - ;; i*86v32) - basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'` - os=-sysv32 + cpu=`echo "$1" | sed -e 's/86.*/86/'` + vendor=pc + os=sysv32 ;; i*86v4*) - basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'` - os=-sysv4 + cpu=`echo "$1" | sed -e 's/86.*/86/'` + vendor=pc + os=sysv4 ;; i*86v) - basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'` - os=-sysv + cpu=`echo "$1" | sed -e 's/86.*/86/'` + vendor=pc + os=sysv ;; i*86sol2) - basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'` - os=-solaris2 + cpu=`echo "$1" | sed -e 's/86.*/86/'` + vendor=pc + os=solaris2 ;; - i386mach) - basic_machine=i386-mach - os=-mach + j90 | j90-cray) + cpu=j90 + vendor=cray + os=${os:-unicos} ;; - vsta) - basic_machine=i386-unknown - os=-vsta - ;; iris | iris4d) - basic_machine=mips-sgi + cpu=mips + vendor=sgi case $os in - -irix*) + irix*) ;; *) - os=-irix4 + os=irix4 ;; esac ;; - isi68 | isi) - basic_machine=m68k-isi - os=-sysv - ;; - leon-*|leon[3-9]-*) - basic_machine=sparc-`echo "$basic_machine" | sed 's/-.*//'` - ;; - m68knommu) - basic_machine=m68k-unknown - os=-linux - ;; - m68knommu-*) - basic_machine=m68k-`echo "$basic_machine" | sed 's/^[^-]*-//'` - os=-linux - ;; - magnum | m3230) - basic_machine=mips-mips - os=-sysv - ;; - merlin) - basic_machine=ns32k-utek - os=-sysv - ;; - microblaze*) - basic_machine=microblaze-xilinx - ;; - mingw64) - basic_machine=x86_64-pc - os=-mingw64 - ;; - mingw32) - basic_machine=i686-pc - os=-mingw32 - ;; - mingw32ce) - basic_machine=arm-unknown - os=-mingw32ce - ;; miniframe) - basic_machine=m68000-convergent + cpu=m68000 + vendor=convergent ;; - *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) - basic_machine=m68k-atari - os=-mint + *mint | mint[0-9]* | *MiNT | *MiNT[0-9]*) + cpu=m68k + vendor=atari + os=mint ;; - mips3*-*) - basic_machine=`echo "$basic_machine" | sed -e 's/mips3/mips64/'` - ;; - mips3*) - basic_machine=`echo "$basic_machine" | sed -e 's/mips3/mips64/'`-unknown - ;; - monitor) - basic_machine=m68k-rom68k - os=-coff - ;; - morphos) - basic_machine=powerpc-unknown - os=-morphos - ;; - moxiebox) - basic_machine=moxie-unknown - os=-moxiebox - ;; - msdos) - basic_machine=i386-pc - os=-msdos - ;; - ms1-*) - basic_machine=`echo "$basic_machine" | sed -e 's/ms1-/mt-/'` - ;; - msys) - basic_machine=i686-pc - os=-msys - ;; - mvs) - basic_machine=i370-ibm - os=-mvs - ;; - nacl) - basic_machine=le32-unknown - os=-nacl - ;; - ncr3000) - basic_machine=i486-ncr - os=-sysv4 - ;; - netbsd386) - basic_machine=i386-unknown - os=-netbsd - ;; - netwinder) - basic_machine=armv4l-rebel - os=-linux - ;; - news | news700 | news800 | news900) - basic_machine=m68k-sony - os=-newsos - ;; - news1000) - basic_machine=m68030-sony - os=-newsos - ;; news-3600 | risc-news) - basic_machine=mips-sony - os=-newsos + cpu=mips + vendor=sony + os=newsos ;; - necv70) - basic_machine=v70-nec - os=-sysv - ;; next | m*-next) - basic_machine=m68k-next + cpu=m68k + vendor=next case $os in - -nextstep* ) + nextstep* ) ;; - -ns2*) - os=-nextstep2 + ns2*) + os=nextstep2 ;; *) - os=-nextstep3 + os=nextstep3 ;; esac ;; - nh3000) - basic_machine=m68k-harris - os=-cxux - ;; - nh[45]000) - basic_machine=m88k-harris - os=-cxux - ;; - nindy960) - basic_machine=i960-intel - os=-nindy - ;; - mon960) - basic_machine=i960-intel - os=-mon960 - ;; - nonstopux) - basic_machine=mips-compaq - os=-nonstopux - ;; np1) - basic_machine=np1-gould + cpu=np1 + vendor=gould ;; - neo-tandem) - basic_machine=neo-tandem - ;; - nse-tandem) - basic_machine=nse-tandem - ;; - nsr-tandem) - basic_machine=nsr-tandem - ;; - nsv-tandem) - basic_machine=nsv-tandem - ;; - nsx-tandem) - basic_machine=nsx-tandem - ;; op50n-* | op60c-*) - basic_machine=hppa1.1-oki - os=-proelf + cpu=hppa1.1 + vendor=oki + os=proelf ;; - openrisc | openrisc-*) - basic_machine=or32-unknown - ;; - os400) - basic_machine=powerpc-ibm - os=-os400 - ;; - OSE68000 | ose68000) - basic_machine=m68000-ericsson - os=-ose - ;; - os68k) - basic_machine=m68k-none - os=-os68k - ;; pa-hitachi) - basic_machine=hppa1.1-hitachi - os=-hiuxwe2 + cpu=hppa1.1 + vendor=hitachi + os=hiuxwe2 ;; - paragon) - basic_machine=i860-intel - os=-osf - ;; - parisc) - basic_machine=hppa-unknown - os=-linux - ;; - parisc-*) - basic_machine=hppa-`echo "$basic_machine" | sed 's/^[^-]*-//'` - os=-linux - ;; pbd) - basic_machine=sparc-tti + cpu=sparc + vendor=tti ;; pbb) - basic_machine=m68k-tti + cpu=m68k + vendor=tti ;; - pc532 | pc532-*) - basic_machine=ns32k-pc532 + pc532) + cpu=ns32k + vendor=pc532 ;; - pc98) - basic_machine=i386-pc - ;; - pc98-*) - basic_machine=i386-`echo "$basic_machine" | sed 's/^[^-]*-//'` - ;; - pentium | p5 | k5 | k6 | nexgen | viac3) - basic_machine=i586-pc - ;; - pentiumpro | p6 | 6x86 | athlon | athlon_*) - basic_machine=i686-pc - ;; - pentiumii | pentium2 | pentiumiii | pentium3) - basic_machine=i686-pc - ;; - pentium4) - basic_machine=i786-pc - ;; - pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) - basic_machine=i586-`echo "$basic_machine" | sed 's/^[^-]*-//'` - ;; - pentiumpro-* | p6-* | 6x86-* | athlon-*) - basic_machine=i686-`echo "$basic_machine" | sed 's/^[^-]*-//'` - ;; - pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) - basic_machine=i686-`echo "$basic_machine" | sed 's/^[^-]*-//'` - ;; - pentium4-*) - basic_machine=i786-`echo "$basic_machine" | sed 's/^[^-]*-//'` - ;; pn) - basic_machine=pn-gould + cpu=pn + vendor=gould ;; - power) basic_machine=power-ibm + power) + cpu=power + vendor=ibm ;; - ppc | ppcbe) basic_machine=powerpc-unknown + ps2) + cpu=i386 + vendor=ibm ;; - ppc-* | ppcbe-*) - basic_machine=powerpc-`echo "$basic_machine" | sed 's/^[^-]*-//'` + rm[46]00) + cpu=mips + vendor=siemens ;; - ppcle | powerpclittle) - basic_machine=powerpcle-unknown + rtpc | rtpc-*) + cpu=romp + vendor=ibm ;; - ppcle-* | powerpclittle-*) - basic_machine=powerpcle-`echo "$basic_machine" | sed 's/^[^-]*-//'` + sde) + cpu=mipsisa32 + vendor=sde + os=${os:-elf} ;; - ppc64) basic_machine=powerpc64-unknown + simso-wrs) + cpu=sparclite + vendor=wrs + os=vxworks ;; - ppc64-*) basic_machine=powerpc64-`echo "$basic_machine" | sed 's/^[^-]*-//'` + tower | tower-32) + cpu=m68k + vendor=ncr ;; - ppc64le | powerpc64little) - basic_machine=powerpc64le-unknown + vpp*|vx|vx-*) + cpu=f301 + vendor=fujitsu ;; - ppc64le-* | powerpc64little-*) - basic_machine=powerpc64le-`echo "$basic_machine" | sed 's/^[^-]*-//'` + w65) + cpu=w65 + vendor=wdc ;; - ps2) - basic_machine=i386-ibm + w89k-*) + cpu=hppa1.1 + vendor=winbond + os=proelf ;; - pw32) - basic_machine=i586-unknown - os=-pw32 + none) + cpu=none + vendor=none ;; - rdos | rdos64) - basic_machine=x86_64-pc - os=-rdos + leon|leon[3-9]) + cpu=sparc + vendor=$basic_machine ;; - rdos32) - basic_machine=i386-pc - os=-rdos + leon-*|leon[3-9]-*) + cpu=sparc + vendor=`echo "$basic_machine" | sed 's/-.*//'` ;; - rom68k) - basic_machine=m68k-rom68k - os=-coff + + *-*) + IFS="-" read cpu vendor <&2 - exit 1 + # Recognize the canonical CPU types that are allowed with any + # company name. + case $cpu in + 1750a | 580 \ + | a29k \ + | aarch64 | aarch64_be \ + | abacus \ + | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] \ + | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] \ + | alphapca5[67] | alpha64pca5[67] \ + | am33_2.0 \ + | amdgcn \ + | arc | arceb \ + | arm | arm[lb]e | arme[lb] | armv* \ + | avr | avr32 \ + | asmjs \ + | ba \ + | be32 | be64 \ + | bfin | bs2000 \ + | c[123]* | c30 | [cjt]90 | c4x \ + | c8051 | clipper | craynv | csky | cydra \ + | d10v | d30v | dlx | dsp16xx \ + | e2k | elxsi | epiphany \ + | f30[01] | f700 | fido | fr30 | frv | ft32 | fx80 \ + | h8300 | h8500 \ + | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ + | hexagon \ + | i370 | i*86 | i860 | i960 | ia16 | ia64 \ + | ip2k | iq2000 \ + | k1om \ + | le32 | le64 \ + | lm32 \ + | m32c | m32r | m32rle \ + | m5200 | m68000 | m680[012346]0 | m68360 | m683?2 | m68k | v70 | w65 \ + | m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | nvptx | picochip \ + | m88110 | m88k | maxq | mb | mcore | mep | metag \ + | microblaze | microblazeel \ + | mips | mipsbe | mipseb | mipsel | mipsle \ + | mips16 \ + | mips64 | mips64el \ + | mips64octeon | mips64octeonel \ + | mips64orion | mips64orionel \ + | mips64r5900 | mips64r5900el \ + | mips64vr | mips64vrel \ + | mips64vr4100 | mips64vr4100el \ + | mips64vr4300 | mips64vr4300el \ + | mips64vr5000 | mips64vr5000el \ + | mips64vr5900 | mips64vr5900el \ + | mipsisa32 | mipsisa32el \ + | mipsisa32r2 | mipsisa32r2el \ + | mipsisa32r6 | mipsisa32r6el \ + | mipsisa64 | mipsisa64el \ + | mipsisa64r2 | mipsisa64r2el \ + | mipsisa64r6 | mipsisa64r6el \ + | mipsisa64sb1 | mipsisa64sb1el \ + | mipsisa64sr71k | mipsisa64sr71kel \ + | mipsr5900 | mipsr5900el \ + | mipstx39 | mipstx39el \ + | mmix \ + | mn10200 | mn10300 \ + | moxie \ + | mt \ + | msp430 \ + | nds32 | nds32le | nds32be \ + | nfp \ + | nios | nios2 | nios2eb | nios2el \ + | none | np1 | ns16k | ns32k \ + | open8 \ + | or1k* \ + | or32 \ + | orion \ + | pdp10 | pdp11 | pj | pjl | pn | power \ + | powerpc | powerpc64 | powerpc64le | powerpcle | powerpcspe \ + | pru \ + | pyramid \ + | riscv | riscv32 | riscv64 \ + | rl78 | romp | rs6000 | rx \ + | score \ + | sh | sh[1234] | sh[24]a | sh[24]ae[lb] | sh[23]e | she[lb] | sh[lb]e \ + | sh[1234]e[lb] | sh[12345][lb]e | sh[23]ele | sh64 | sh64le \ + | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet \ + | sparclite \ + | sparcv8 | sparcv9 | sparcv9b | sparcv9v | sv1 | sx* \ + | spu \ + | tahoe \ + | tic30 | tic4x | tic54x | tic55x | tic6x | tic80 \ + | tron \ + | ubicom32 \ + | v850 | v850e | v850e1 | v850es | v850e2 | v850e2v3 \ + | vax \ + | visium \ + | wasm32 \ + | we32k \ + | x86 | x86_64 | xc16x | xgate | xps100 \ + | xstormy16 | xtensa* \ + | ymp \ + | z8k | z80) + ;; + + *) + echo Invalid configuration \`"$1"\': machine \`"$cpu-$vendor"\' not recognized 1>&2 + exit 1 + ;; + esac ;; esac # Here we canonicalize certain aliases for manufacturers. -case $basic_machine in - *-digital*) - basic_machine=`echo "$basic_machine" | sed 's/digital.*/dec/'` +case $vendor in + digital*) + vendor=dec ;; - *-commodore*) - basic_machine=`echo "$basic_machine" | sed 's/commodore.*/cbm/'` + commodore*) + vendor=cbm ;; *) ;; @@ -1334,198 +1271,245 @@ # Decode manufacturer-specific aliases for certain operating systems. -if [ x"$os" != x"" ] +if [ x$os != x ] then case $os in # First match some system type aliases that might get confused # with valid system types. - # -solaris* is a basic system type, with this one exception. - -auroraux) - os=-auroraux + # solaris* is a basic system type, with this one exception. + auroraux) + os=auroraux ;; - -solaris1 | -solaris1.*) + bluegene*) + os=cnk + ;; + solaris1 | solaris1.*) os=`echo $os | sed -e 's|solaris1|sunos4|'` ;; - -solaris) - os=-solaris2 + solaris) + os=solaris2 ;; - -unixware*) - os=-sysv4.2uw + unixware*) + os=sysv4.2uw ;; - -gnu/linux*) + gnu/linux*) os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` ;; # es1800 is here to avoid being matched by es* (a different OS) - -es1800*) - os=-ose + es1800*) + os=ose ;; + # Some version numbers need modification + chorusos*) + os=chorusos + ;; + isc) + os=isc2.2 + ;; + sco6) + os=sco5v6 + ;; + sco5) + os=sco3.2v5 + ;; + sco4) + os=sco3.2v4 + ;; + sco3.2.[4-9]*) + os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` + ;; + sco3.2v[4-9]* | sco5v6*) + # Don't forget version if it is 3.2v4 or newer. + ;; + scout) + # Don't match below + ;; + sco*) + os=sco3.2v2 + ;; + psos*) + os=psos + ;; # Now accept the basic system types. # The portable systems comes first. # Each alternative MUST end in a * to match a version number. - # -sysv* is not here because it comes later, after sysvr4. - -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ - | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\ - | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \ - | -sym* | -kopensolaris* | -plan9* \ - | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ - | -aos* | -aros* | -cloudabi* | -sortix* \ - | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ - | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ - | -hiux* | -knetbsd* | -mirbsd* | -netbsd* \ - | -bitrig* | -openbsd* | -solidbsd* | -libertybsd* \ - | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ - | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ - | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ - | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ - | -chorusos* | -chorusrdb* | -cegcc* | -glidix* \ - | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ - | -midipix* | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \ - | -linux-newlib* | -linux-musl* | -linux-uclibc* \ - | -uxpv* | -beos* | -mpeix* | -udk* | -moxiebox* \ - | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* \ - | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ - | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ - | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ - | -morphos* | -superux* | -rtmk* | -windiss* \ - | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ - | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* \ - | -onefs* | -tirtos* | -phoenix* | -fuchsia* | -redox* | -bme*) + # sysv* is not here because it comes later, after sysvr4. + gnu* | bsd* | mach* | minix* | genix* | ultrix* | irix* \ + | *vms* | esix* | aix* | cnk* | sunos | sunos[34]*\ + | hpux* | unos* | osf* | luna* | dgux* | auroraux* | solaris* \ + | sym* | kopensolaris* | plan9* \ + | amigaos* | amigados* | msdos* | newsos* | unicos* | aof* \ + | aos* | aros* | cloudabi* | sortix* \ + | nindy* | vxsim* | vxworks* | ebmon* | hms* | mvs* \ + | clix* | riscos* | uniplus* | iris* | isc* | rtu* | xenix* \ + | knetbsd* | mirbsd* | netbsd* \ + | bitrig* | openbsd* | solidbsd* | libertybsd* \ + | ekkobsd* | kfreebsd* | freebsd* | riscix* | lynxos* \ + | bosx* | nextstep* | cxux* | aout* | elf* | oabi* \ + | ptx* | coff* | ecoff* | winnt* | domain* | vsta* \ + | udi* | eabi* | lites* | ieee* | go32* | aux* | hcos* \ + | chorusrdb* | cegcc* | glidix* \ + | cygwin* | msys* | pe* | moss* | proelf* | rtems* \ + | midipix* | mingw32* | mingw64* | linux-gnu* | linux-android* \ + | linux-newlib* | linux-musl* | linux-uclibc* \ + | uxpv* | beos* | mpeix* | udk* | moxiebox* \ + | interix* | uwin* | mks* | rhapsody* | darwin* \ + | openstep* | oskit* | conix* | pw32* | nonstopux* \ + | storm-chaos* | tops10* | tenex* | tops20* | its* \ + | os2* | vos* | palmos* | uclinux* | nucleus* \ + | morphos* | superux* | rtmk* | windiss* \ + | powermax* | dnix* | nx6 | nx7 | sei* | dragonfly* \ + | skyos* | haiku* | rdos* | toppers* | drops* | es* \ + | onefs* | tirtos* | phoenix* | fuchsia* | redox* | bme* \ + | midnightbsd* | amdhsa* | unleashed*) # Remember, each alternative MUST END IN *, to match a version number. ;; - -qnx*) - case $basic_machine in - x86-* | i*86-*) + qnx*) + case $cpu in + x86 | i*86) ;; *) - os=-nto$os + os=nto-$os ;; esac ;; - -nto-qnx*) + hiux*) + os=hiuxwe2 ;; - -nto*) + nto-qnx*) + ;; + nto*) os=`echo $os | sed -e 's|nto|nto-qnx|'` ;; - -sim | -xray | -os68k* | -v88r* \ - | -windows* | -osx | -abug | -netware* | -os9* \ - | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) + sim | xray | os68k* | v88r* \ + | windows* | osx | abug | netware* | os9* \ + | macos* | mpw* | magic* | mmixware* | mon960* | lnews*) ;; - -mac*) + linux-dietlibc) + os=linux-dietlibc + ;; + linux*) + os=`echo $os | sed -e 's|linux|linux-gnu|'` + ;; + lynx*178) + os=lynxos178 + ;; + lynx*5) + os=lynxos5 + ;; + lynx*) + os=lynxos + ;; + mac*) os=`echo "$os" | sed -e 's|mac|macos|'` ;; - -linux-dietlibc) - os=-linux-dietlibc + opened*) + os=openedition ;; - -linux*) - os=`echo $os | sed -e 's|linux|linux-gnu|'` + os400*) + os=os400 ;; - -sunos5*) + sunos5*) os=`echo "$os" | sed -e 's|sunos5|solaris2|'` ;; - -sunos6*) + sunos6*) os=`echo "$os" | sed -e 's|sunos6|solaris3|'` ;; - -opened*) - os=-openedition + wince*) + os=wince ;; - -os400*) - os=-os400 + utek*) + os=bsd ;; - -wince*) - os=-wince + dynix*) + os=bsd ;; - -utek*) - os=-bsd + acis*) + os=aos ;; - -dynix*) - os=-bsd + atheos*) + os=atheos ;; - -acis*) - os=-aos + syllable*) + os=syllable ;; - -atheos*) - os=-atheos + 386bsd) + os=bsd ;; - -syllable*) - os=-syllable + ctix* | uts*) + os=sysv ;; - -386bsd) - os=-bsd + nova*) + os=rtmk-nova ;; - -ctix* | -uts*) - os=-sysv + ns2) + os=nextstep2 ;; - -nova*) - os=-rtmk-nova + nsk*) + os=nsk ;; - -ns2) - os=-nextstep2 - ;; - -nsk*) - os=-nsk - ;; # Preserve the version number of sinix5. - -sinix5.*) + sinix5.*) os=`echo $os | sed -e 's|sinix|sysv|'` ;; - -sinix*) - os=-sysv4 + sinix*) + os=sysv4 ;; - -tpf*) - os=-tpf + tpf*) + os=tpf ;; - -triton*) - os=-sysv3 + triton*) + os=sysv3 ;; - -oss*) - os=-sysv3 + oss*) + os=sysv3 ;; - -svr4*) - os=-sysv4 + svr4*) + os=sysv4 ;; - -svr3) - os=-sysv3 + svr3) + os=sysv3 ;; - -sysvr4) - os=-sysv4 + sysvr4) + os=sysv4 ;; - # This must come after -sysvr4. - -sysv*) + # This must come after sysvr4. + sysv*) ;; - -ose*) - os=-ose + ose*) + os=ose ;; - -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) - os=-mint + *mint | mint[0-9]* | *MiNT | MiNT[0-9]*) + os=mint ;; - -zvmoe) - os=-zvmoe + zvmoe) + os=zvmoe ;; - -dicos*) - os=-dicos + dicos*) + os=dicos ;; - -pikeos*) + pikeos*) # Until real need of OS specific support for # particular features comes up, bare metal # configurations are quite functional. - case $basic_machine in + case $cpu in arm*) - os=-eabi + os=eabi ;; *) - os=-elf + os=elf ;; esac ;; - -nacl*) + nacl*) ;; - -ios) + ios) ;; - -none) + none) ;; + *-eabi) + ;; *) - # Get rid of the `-' at the beginning of $os. - os=`echo $os | sed 's/[^-]*-//'` echo Invalid configuration \`"$1"\': system \`"$os"\' not recognized 1>&2 exit 1 ;; @@ -1542,175 +1526,181 @@ # will signal an error saying that MANUFACTURER isn't an operating # system, and we'll never get to this point. -case $basic_machine in +case $cpu-$vendor in score-*) - os=-elf + os=elf ;; spu-*) - os=-elf + os=elf ;; *-acorn) - os=-riscix1.2 + os=riscix1.2 ;; arm*-rebel) - os=-linux + os=linux ;; arm*-semi) - os=-aout + os=aout ;; c4x-* | tic4x-*) - os=-coff + os=coff ;; c8051-*) - os=-elf + os=elf ;; + clipper-intergraph) + os=clix + ;; hexagon-*) - os=-elf + os=elf ;; tic54x-*) - os=-coff + os=coff ;; tic55x-*) - os=-coff + os=coff ;; tic6x-*) - os=-coff + os=coff ;; # This must come before the *-dec entry. pdp10-*) - os=-tops20 + os=tops20 ;; pdp11-*) - os=-none + os=none ;; *-dec | vax-*) - os=-ultrix4.2 + os=ultrix4.2 ;; m68*-apollo) - os=-domain + os=domain ;; i386-sun) - os=-sunos4.0.2 + os=sunos4.0.2 ;; m68000-sun) - os=-sunos3 + os=sunos3 ;; m68*-cisco) - os=-aout + os=aout ;; mep-*) - os=-elf + os=elf ;; mips*-cisco) - os=-elf + os=elf ;; mips*-*) - os=-elf + os=elf ;; or32-*) - os=-coff + os=coff ;; *-tti) # must be before sparc entry or we get the wrong os. - os=-sysv3 + os=sysv3 ;; sparc-* | *-sun) - os=-sunos4.1.1 + os=sunos4.1.1 ;; pru-*) - os=-elf + os=elf ;; *-be) - os=-beos + os=beos ;; *-ibm) - os=-aix + os=aix ;; *-knuth) - os=-mmixware + os=mmixware ;; *-wec) - os=-proelf + os=proelf ;; *-winbond) - os=-proelf + os=proelf ;; *-oki) - os=-proelf + os=proelf ;; *-hp) - os=-hpux + os=hpux ;; *-hitachi) - os=-hiux + os=hiux ;; i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) - os=-sysv + os=sysv ;; *-cbm) - os=-amigaos + os=amigaos ;; *-dg) - os=-dgux + os=dgux ;; *-dolphin) - os=-sysv3 + os=sysv3 ;; m68k-ccur) - os=-rtu + os=rtu ;; m88k-omron*) - os=-luna + os=luna ;; *-next) - os=-nextstep + os=nextstep ;; *-sequent) - os=-ptx + os=ptx ;; *-crds) - os=-unos + os=unos ;; *-ns) - os=-genix + os=genix ;; i370-*) - os=-mvs + os=mvs ;; *-gould) - os=-sysv + os=sysv ;; *-highlevel) - os=-bsd + os=bsd ;; *-encore) - os=-bsd + os=bsd ;; *-sgi) - os=-irix + os=irix ;; *-siemens) - os=-sysv4 + os=sysv4 ;; *-masscomp) - os=-rtu + os=rtu ;; f30[01]-fujitsu | f700-fujitsu) - os=-uxpv + os=uxpv ;; *-rom68k) - os=-coff + os=coff ;; *-*bug) - os=-coff + os=coff ;; *-apple) - os=-macos + os=macos ;; *-atari*) - os=-mint + os=mint ;; + *-wrs) + os=vxworks + ;; *) - os=-none + os=none ;; esac fi @@ -1717,83 +1707,84 @@ # Here we handle the case where we know the os, and the CPU type, but not the # manufacturer. We pick the logical manufacturer. -vendor=unknown -case $basic_machine in - *-unknown) +case $vendor in + unknown) case $os in - -riscix*) + riscix*) vendor=acorn ;; - -sunos*) + sunos*) vendor=sun ;; - -cnk*|-aix*) + cnk*|-aix*) vendor=ibm ;; - -beos*) + beos*) vendor=be ;; - -hpux*) + hpux*) vendor=hp ;; - -mpeix*) + mpeix*) vendor=hp ;; - -hiux*) + hiux*) vendor=hitachi ;; - -unos*) + unos*) vendor=crds ;; - -dgux*) + dgux*) vendor=dg ;; - -luna*) + luna*) vendor=omron ;; - -genix*) + genix*) vendor=ns ;; - -mvs* | -opened*) + clix*) + vendor=intergraph + ;; + mvs* | opened*) vendor=ibm ;; - -os400*) + os400*) vendor=ibm ;; - -ptx*) + ptx*) vendor=sequent ;; - -tpf*) + tpf*) vendor=ibm ;; - -vxsim* | -vxworks* | -windiss*) + vxsim* | vxworks* | windiss*) vendor=wrs ;; - -aux*) + aux*) vendor=apple ;; - -hms*) + hms*) vendor=hitachi ;; - -mpw* | -macos*) + mpw* | macos*) vendor=apple ;; - -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) + *mint | mint[0-9]* | *MiNT | MiNT[0-9]*) vendor=atari ;; - -vos*) + vos*) vendor=stratus ;; esac - basic_machine=`echo "$basic_machine" | sed "s/unknown/$vendor/"` ;; esac -echo "$basic_machine$os" +echo "$cpu-$vendor-$os" exit # Local variables: -# eval: (add-hook 'write-file-functions 'time-stamp) +# eval: (add-hook 'before-save-hook 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" From rra at isc.org Sat Dec 29 13:49:21 2018 From: rra at isc.org (INN Commit) Date: Sat, 29 Dec 2018 05:49:21 -0800 (PST) Subject: INN commit: branches/2.6 (m4/libtool.m4 support/ltmain.sh) Message-ID: <20181229134921.86EBC67D78@hope.eyrie.org> Date: Saturday, December 29, 2018 @ 05:49:20 Author: iulius Revision: 10324 Update libtool from upstream 2.4.6-6 Debian version Modified: branches/2.6/m4/libtool.m4 branches/2.6/support/ltmain.sh -------------------+ m4/libtool.m4 | 15 +- support/ltmain.sh | 281 +++++++++++++++++++++++++++++++++++++++------------- 2 files changed, 219 insertions(+), 77 deletions(-) Modified: m4/libtool.m4 =================================================================== --- m4/libtool.m4 2018-12-29 13:48:23 UTC (rev 10323) +++ m4/libtool.m4 2018-12-29 13:49:20 UTC (rev 10324) @@ -4063,7 +4063,8 @@ if AC_TRY_EVAL(ac_compile); then # Now try to grab the symbols. nlist=conftest.nm - if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then + $ECHO "$as_me:$LINENO: $NM conftest.$ac_objext | $lt_cv_sys_global_symbol_pipe > $nlist" >&AS_MESSAGE_LOG_FD + if eval "$NM" conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist 2>&AS_MESSAGE_LOG_FD && test -s "$nlist"; then # Try sorting and uniquifying the output. if sort "$nlist" | uniq > "$nlist"T; then mv -f "$nlist"T "$nlist" @@ -6438,7 +6439,7 @@ # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " \-L"' else GXX=no @@ -6813,7 +6814,7 @@ # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. - output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' + output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP " \-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test yes = "$GXX"; then @@ -6878,7 +6879,7 @@ # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. - output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' + output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP " \-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test yes = "$GXX"; then @@ -7217,7 +7218,7 @@ # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " \-L"' else # FIXME: insert proper C++ library support @@ -7301,7 +7302,7 @@ # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " \-L"' else # g++ 2.7 appears to require '-G' NOT '-shared' on this # platform. @@ -7312,7 +7313,7 @@ # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. - output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' + output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " \-L"' fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $wl$libdir' Modified: support/ltmain.sh =================================================================== --- support/ltmain.sh 2018-12-29 13:48:23 UTC (rev 10323) +++ support/ltmain.sh 2018-12-29 13:49:20 UTC (rev 10324) @@ -39,7 +39,7 @@ PROGRAM=libtool PACKAGE=libtool -VERSION="2.4.6 Debian-2.4.6-2" +VERSION="2.4.6 Debian-2.4.6-6" package_revision=2.4.6 @@ -72,7 +72,7 @@ # libraries, which are installed to $pkgauxdir. # Set a version string for this script. -scriptversion=2015-01-20.17; # UTC +scriptversion=2015-10-04.22; # UTC # General shell script boiler plate, and helper functions. # Written by Gary V. Vaughan, 2004 @@ -1099,6 +1099,57 @@ } +# func_quote ARG +# -------------- +# Aesthetically quote one ARG, store the result into $func_quote_result. Note +# that we keep attention to performance here (so far O(N) complexity as long as +# func_append is O(1)). +func_quote () +{ + $debug_cmd + + func_quote_result=$1 + + case $func_quote_result in + *[\\\`\"\$]*) + case $func_quote_result in + *[\[\*\?]*) + func_quote_result=`$ECHO "$func_quote_result" | $SED "$sed_quote_subst"` + return 0 + ;; + esac + + func_quote_old_IFS=$IFS + for _G_char in '\' '`' '"' '$' + do + # STATE($1) PREV($2) SEPARATOR($3) + set start "" "" + func_quote_result=dummy"$_G_char$func_quote_result$_G_char"dummy + IFS=$_G_char + for _G_part in $func_quote_result + do + case $1 in + quote) + func_append func_quote_result "$3$2" + set quote "$_G_part" "\\$_G_char" + ;; + start) + set first "" "" + func_quote_result= + ;; + first) + set quote "$_G_part" "" + ;; + esac + done + IFS=$func_quote_old_IFS + done + ;; + *) ;; + esac +} + + # func_quote_for_eval ARG... # -------------------------- # Aesthetically quote ARGs to be evaled later. @@ -1115,12 +1166,8 @@ func_quote_for_eval_unquoted_result= func_quote_for_eval_result= while test 0 -lt $#; do - case $1 in - *[\\\`\"\$]*) - _G_unquoted_arg=`printf '%s\n' "$1" |$SED "$sed_quote_subst"` ;; - *) - _G_unquoted_arg=$1 ;; - esac + func_quote "$1" + _G_unquoted_arg=$func_quote_result if test -n "$func_quote_for_eval_unquoted_result"; then func_append func_quote_for_eval_unquoted_result " $_G_unquoted_arg" else @@ -1378,7 +1425,7 @@ #! /bin/sh # Set a version string for this script. -scriptversion=2014-01-07.03; # UTC +scriptversion=2015-10-07.11; # UTC # A portable, pluggable option parser for Bourne shell. # Written by Gary V. Vaughan, 2010 @@ -1538,6 +1585,8 @@ { $debug_cmd + _G_rc_run_hooks=false + case " $hookable_fns " in *" $1 "*) ;; *) func_fatal_error "'$1' does not support hook funcions.n" ;; @@ -1546,16 +1595,16 @@ eval _G_hook_fns=\$$1_hooks; shift for _G_hook in $_G_hook_fns; do - eval $_G_hook '"$@"' - - # store returned options list back into positional - # parameters for next 'cmd' execution. - eval _G_hook_result=\$${_G_hook}_result - eval set dummy "$_G_hook_result"; shift + if eval $_G_hook '"$@"'; then + # store returned options list back into positional + # parameters for next 'cmd' execution. + eval _G_hook_result=\$${_G_hook}_result + eval set dummy "$_G_hook_result"; shift + _G_rc_run_hooks=: + fi done - func_quote_for_eval ${1+"$@"} - func_run_hooks_result=$func_quote_for_eval_result + $_G_rc_run_hooks && func_run_hooks_result=$_G_hook_result } @@ -1565,11 +1614,17 @@ ## --------------- ## # In order to add your own option parsing hooks, you must accept the -# full positional parameter list in your hook function, remove any -# options that you action, and then pass back the remaining unprocessed +# full positional parameter list in your hook function, you may remove/edit +# any options that you action, and then pass back the remaining unprocessed # options in '_result', escaped suitably for -# 'eval'. Like this: +# 'eval'. In this case you also must return $EXIT_SUCCESS to let the +# hook's caller know that it should pay attention to +# '_result'. Returning $EXIT_FAILURE signalizes that +# arguments are left untouched by the hook and therefore caller will ignore the +# result variable. # +# Like this: +# # my_options_prep () # { # $debug_cmd @@ -1578,9 +1633,11 @@ # usage_message=$usage_message' # -s, --silent don'\''t print informational messages # ' -# -# func_quote_for_eval ${1+"$@"} -# my_options_prep_result=$func_quote_for_eval_result +# # No change in '$@' (ignored completely by this hook). There is +# # no need to do the equivalent (but slower) action: +# # func_quote_for_eval ${1+"$@"} +# # my_options_prep_result=$func_quote_for_eval_result +# false # } # func_add_hook func_options_prep my_options_prep # @@ -1589,6 +1646,8 @@ # { # $debug_cmd # +# args_changed=false +# # # Note that for efficiency, we parse as many options as we can # # recognise in a loop before passing the remainder back to the # # caller on the first unrecognised argument we encounter. @@ -1595,19 +1654,29 @@ # while test $# -gt 0; do # opt=$1; shift # case $opt in -# --silent|-s) opt_silent=: ;; +# --silent|-s) opt_silent=: +# args_changed=: +# ;; # # Separate non-argument short options: # -s*) func_split_short_opt "$_G_opt" # set dummy "$func_split_short_opt_name" \ # "-$func_split_short_opt_arg" ${1+"$@"} # shift +# args_changed=: # ;; -# *) set dummy "$_G_opt" "$*"; shift; break ;; +# *) # Make sure the first unrecognised option "$_G_opt" +# # is added back to "$@", we could need that later +# # if $args_changed is true. +# set dummy "$_G_opt" ${1+"$@"}; shift; break ;; # esac # done # -# func_quote_for_eval ${1+"$@"} -# my_silent_option_result=$func_quote_for_eval_result +# if $args_changed; then +# func_quote_for_eval ${1+"$@"} +# my_silent_option_result=$func_quote_for_eval_result +# fi +# +# $args_changed # } # func_add_hook func_parse_options my_silent_option # @@ -1619,16 +1688,32 @@ # $opt_silent && $opt_verbose && func_fatal_help "\ # '--silent' and '--verbose' options are mutually exclusive." # -# func_quote_for_eval ${1+"$@"} -# my_option_validation_result=$func_quote_for_eval_result +# false # } # func_add_hook func_validate_options my_option_validation # -# You'll alse need to manually amend $usage_message to reflect the extra +# You'll also need to manually amend $usage_message to reflect the extra # options you parse. It's preferable to append if you can, so that # multiple option parsing hooks can be added safely. +# func_options_finish [ARG]... +# ---------------------------- +# Finishing the option parse loop (call 'func_options' hooks ATM). +func_options_finish () +{ + $debug_cmd + + _G_func_options_finish_exit=false + if func_run_hooks func_options ${1+"$@"}; then + func_options_finish_result=$func_run_hooks_result + _G_func_options_finish_exit=: + fi + + $_G_func_options_finish_exit +} + + # func_options [ARG]... # --------------------- # All the functions called inside func_options are hookable. See the @@ -1638,17 +1723,28 @@ { $debug_cmd - func_options_prep ${1+"$@"} - eval func_parse_options \ - ${func_options_prep_result+"$func_options_prep_result"} - eval func_validate_options \ - ${func_parse_options_result+"$func_parse_options_result"} + _G_rc_options=false - eval func_run_hooks func_options \ - ${func_validate_options_result+"$func_validate_options_result"} + for my_func in options_prep parse_options validate_options options_finish + do + if eval func_$my_func '${1+"$@"}'; then + eval _G_res_var='$'"func_${my_func}_result" + eval set dummy "$_G_res_var" ; shift + _G_rc_options=: + fi + done - # save modified positional parameters for caller - func_options_result=$func_run_hooks_result + # Save modified positional parameters for caller. As a top-level + # options-parser function we always need to set the 'func_options_result' + # variable (regardless the $_G_rc_options value). + if $_G_rc_options; then + func_options_result=$_G_res_var + else + func_quote_for_eval ${1+"$@"} + func_options_result=$func_quote_for_eval_result + fi + + $_G_rc_options } @@ -1657,9 +1753,9 @@ # All initialisations required before starting the option parse loop. # Note that when calling hook functions, we pass through the list of # positional parameters. If a hook function modifies that list, and -# needs to propogate that back to rest of this script, then the complete +# needs to propagate that back to rest of this script, then the complete # modified list must be put in 'func_run_hooks_result' before -# returning. +# returning $EXIT_SUCCESS (otherwise $EXIT_FAILURE is returned). func_hookable func_options_prep func_options_prep () { @@ -1669,10 +1765,14 @@ opt_verbose=false opt_warning_types= - func_run_hooks func_options_prep ${1+"$@"} + _G_rc_options_prep=false + if func_run_hooks func_options_prep ${1+"$@"}; then + _G_rc_options_prep=: + # save modified positional parameters for caller + func_options_prep_result=$func_run_hooks_result + fi - # save modified positional parameters for caller - func_options_prep_result=$func_run_hooks_result + $_G_rc_options_prep } @@ -1686,18 +1786,20 @@ func_parse_options_result= + _G_rc_parse_options=false # this just eases exit handling while test $# -gt 0; do # Defer to hook functions for initial option parsing, so they # get priority in the event of reusing an option name. - func_run_hooks func_parse_options ${1+"$@"} + if func_run_hooks func_parse_options ${1+"$@"}; then + eval set dummy "$func_run_hooks_result"; shift + _G_rc_parse_options=: + fi - # Adjust func_parse_options positional parameters to match - eval set dummy "$func_run_hooks_result"; shift - # Break out of the loop if we already parsed every option. test $# -gt 0 || break + _G_match_parse_options=: _G_opt=$1 shift case $_G_opt in @@ -1712,7 +1814,10 @@ ;; --warnings|--warning|-W) - test $# = 0 && func_missing_arg $_G_opt && break + if test $# = 0 && func_missing_arg $_G_opt; then + _G_rc_parse_options=: + break + fi case " $warning_categories $1" in *" $1 "*) # trailing space prevents matching last $1 above @@ -1765,15 +1870,25 @@ shift ;; - --) break ;; + --) _G_rc_parse_options=: ; break ;; -*) func_fatal_help "unrecognised option: '$_G_opt'" ;; - *) set dummy "$_G_opt" ${1+"$@"}; shift; break ;; + *) set dummy "$_G_opt" ${1+"$@"}; shift + _G_match_parse_options=false + break + ;; esac + + $_G_match_parse_options && _G_rc_parse_options=: done - # save modified positional parameters for caller - func_quote_for_eval ${1+"$@"} - func_parse_options_result=$func_quote_for_eval_result + + if $_G_rc_parse_options; then + # save modified positional parameters for caller + func_quote_for_eval ${1+"$@"} + func_parse_options_result=$func_quote_for_eval_result + fi + + $_G_rc_parse_options } @@ -1786,16 +1901,21 @@ { $debug_cmd + _G_rc_validate_options=false + # Display all warnings if -W was not given. test -n "$opt_warning_types" || opt_warning_types=" $warning_categories" - func_run_hooks func_validate_options ${1+"$@"} + if func_run_hooks func_validate_options ${1+"$@"}; then + # save modified positional parameters for caller + func_validate_options_result=$func_run_hooks_result + _G_rc_validate_options=: + fi # Bail if the options were screwed! $exit_cmd $EXIT_FAILURE - # save modified positional parameters for caller - func_validate_options_result=$func_run_hooks_result + $_G_rc_validate_options } @@ -2076,7 +2196,7 @@ compiler: $LTCC compiler flags: $LTCFLAGS linker: $LD (gnu? $with_gnu_ld) - version: $progname $scriptversion Debian-2.4.6-2 + version: $progname $scriptversion Debian-2.4.6-6 automake: `($AUTOMAKE --version) 2>/dev/null |$SED 1q` autoconf: `($AUTOCONF --version) 2>/dev/null |$SED 1q` @@ -2278,6 +2398,8 @@ nonopt= preserve_args= + _G_rc_lt_options_prep=: + # Shorthand for --mode=foo, only valid as the first argument case $1 in clean|clea|cle|cl) @@ -2301,11 +2423,18 @@ uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u) shift; set dummy --mode uninstall ${1+"$@"}; shift ;; + *) + _G_rc_lt_options_prep=false + ;; esac - # Pass back the list of options. - func_quote_for_eval ${1+"$@"} - libtool_options_prep_result=$func_quote_for_eval_result + if $_G_rc_lt_options_prep; then + # Pass back the list of options. + func_quote_for_eval ${1+"$@"} + libtool_options_prep_result=$func_quote_for_eval_result + fi + + $_G_rc_lt_options_prep } func_add_hook func_options_prep libtool_options_prep @@ -2317,9 +2446,12 @@ { $debug_cmd + _G_rc_lt_parse_options=false + # Perform our own loop to consume as many options as possible in # each iteration. while test $# -gt 0; do + _G_match_lt_parse_options=: _G_opt=$1 shift case $_G_opt in @@ -2394,15 +2526,22 @@ func_append preserve_args " $_G_opt" ;; - # An option not handled by this hook function: - *) set dummy "$_G_opt" ${1+"$@"}; shift; break ;; + # An option not handled by this hook function: + *) set dummy "$_G_opt" ${1+"$@"} ; shift + _G_match_lt_parse_options=false + break + ;; esac + $_G_match_lt_parse_options && _G_rc_lt_parse_options=: done + if $_G_rc_lt_parse_options; then + # save modified positional parameters for caller + func_quote_for_eval ${1+"$@"} + libtool_parse_options_result=$func_quote_for_eval_result + fi - # save modified positional parameters for caller - func_quote_for_eval ${1+"$@"} - libtool_parse_options_result=$func_quote_for_eval_result + $_G_rc_lt_parse_options } func_add_hook func_parse_options libtool_parse_options @@ -5267,7 +5406,8 @@ if test \"\$libtool_execute_magic\" != \"$magic\"; then file=\"\$0\"" - qECHO=`$ECHO "$ECHO" | $SED "$sed_quote_subst"` + func_quote "$ECHO" + qECHO=$func_quote_result $ECHO "\ # A function that is used when there is no print builtin or printf. @@ -10524,8 +10664,8 @@ relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command" fi done - relink_command="(cd `pwd`; $relink_command)" - relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"` + func_quote "(cd `pwd`; $relink_command)" + relink_command=$func_quote_result fi # Only actually do things if not in dry run mode. @@ -10771,7 +10911,8 @@ done # Quote the link command for shipping. relink_command="(cd `pwd`; $SHELL \"$progpath\" $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)" - relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"` + func_quote "$relink_command" + relink_command=$func_quote_result if test yes = "$hardcode_automatic"; then relink_command= fi