🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.readers
Article #264561

Re: SLRN build fail on macOS

#264561
From: Julien ÉLIE
Date: Sat, 13 Feb 2021 09:32
64 lines
4064 bytes
Also crossposting to the most appropriate newsgroup (news.software.readers).
The original question is:  where to submit patches for slrn?  Is 
development still active?  (it seems that there had been 3 commits in 
January by John E. Davis after 4 years without any commit at all)

There's an improvement to add to the VA_COPY portability code.
slrn's autoconf/configure.ac file uses code taken from very old glib 
1.2.8 (according to a comment).  Nowadays, va_copy could just be defined as:

/*
  * C99 requires va_copy.  Older versions of GCC provide __va_copy.  Per the
  * Autoconf manual, memcpy is a generally portable fallback.
  */
#ifndef va_copy
#    ifdef __va_copy
#        define va_copy(d, s) __va_copy((d), (s))
#    else
#        define va_copy(d, s) memcpy(&(d), &(s), sizeof(va_list))
#    endif
#endif

-- 
Julien


Le 13/02/2021 à 10:24, Julien ÉLIE a écrit :
> Bonjour Gérald,
> 
>>> #ifndef va_copy
>>> #    ifdef __va_copy
>>> #        define va_copy(d, s) __va_copy((d), (s))
>>> #    else
>>> #        define va_copy(d, s) memcpy(&(d), &(s), sizeof(va_list))
>>> #    endif
>>> #endif
>>
>> As I said, it's beyond my skills or knowledge.
>> What is the file to patch with this?
>> Anything else to modify?
> 
> I see that VA_COPY is only used twice in srln source code.
> 
> Once in src/snprintf.c, where there is:
> 
> /* Define VA_COPY() to do the right thing for copying va_list variables.
>   * config.h may have already defined VA_COPY as va_copy or __va_copy.
>   */
> #ifndef VA_COPY
> # if (defined (__GNUC__) && defined (__PPC__) && (defined (_CALL_SYSV) 
> || defined (__WIN32__))) || defined (__WATCOMC__)
> #  define VA_COPY(ap1, ap2)   (*(ap1) = *(ap2))
> # elif defined (VA_COPY_AS_ARRAY)
> #  define VA_COPY(ap1, ap2)   memmove ((ap1), (ap2), sizeof (va_list))
> # else /* va_list is a pointer */
> #  define VA_COPY(ap1, ap2)   ((ap1) = (ap2))
> # endif /* va_list is a pointer */
> #endif /* !VA_COPY */
> 
> And another time in src/misc.c where that piece of code is not present.
> 
> Well, to be straight-forward (though not optimal because with a 
> duplication), just add the same lines as above at the beginning of 
> src/misc.c.
> I believe it will solve the problem.
Technical Details
Message-ID: <s086c8$c1n$1@news.trigofacile.com>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!apf1.newsdeef.eu!not-for-mail
References: <i6fq61Fa3dbU1@mid.individual.net> <rueg47$og$2@neodome.net> <ruenj0$dsl$1@dont-email.me> <ruf1ah$1vtp$1@neodome.net> <rufd7o$6ud$1@dont-email.me> <slrns0nh0v.hh9.gerald.niel+spam@news.gegeweb.org> <AABgDBR4nnEAAAQH.A1.flnews@Server4.micha.freeshell.org> <slrns0qcf0.3c0.gerald.niel+spam@news.gegeweb.org> <rujevf$7hs$1@pasdenom.info> <slrns0qgep.47g.gerald.niel+spam@news.gegeweb.org> <ruk3dr$2hf$1@news.trigofacile.com> <slrns0vtnm.nbf.gerald.niel+spam@news.gegeweb.org> <ruov85$a2f$1@news.trigofacile.com> <slrns21rbm.1jhv.gerald.niel+spam@home.niel.me> <AABgIRNoBmwAAAMz.A1.flnews@WStation5.stz-e.de> <slrns24ikp.9uk.gerald.niel+spam@home.niel.me> <AABgIwHhIAEAAAoy.A1.flnews@WStation7.micha.freeshell.org> <slrns2773u.njo.gerald.niel+spam@home.niel.me> <slrns27bjv.td4.gerald.niel+spam@home.niel.me> <s01ll7$sc6$1@news.trigofacile.com> <slrns2f3eb.30mj.gerald.niel+spam@home.niel.me> <s085rs$b9p$1@news.trigofacile.com>

Show Full Headers
Complete Article Headers
Message-ID: <s086c8$c1n$1@news.trigofacile.com>
Subject: Re: SLRN build fail on macOS
Date: Sat, 13 Feb 2021 10:32:56 +0100
From: Julien ÉLIE <iulius@nom-de-mon-site.com.invalid>
References: <i6fq61Fa3dbU1@mid.individual.net> <rueg47$og$2@neodome.net> <ruenj0$dsl$1@dont-email.me> <ruf1ah$1vtp$1@neodome.net> <rufd7o$6ud$1@dont-email.me> <slrns0nh0v.hh9.gerald.niel+spam@news.gegeweb.org> <AABgDBR4nnEAAAQH.A1.flnews@Server4.micha.freeshell.org> <slrns0qcf0.3c0.gerald.niel+spam@news.gegeweb.org> <rujevf$7hs$1@pasdenom.info> <slrns0qgep.47g.gerald.niel+spam@news.gegeweb.org> <ruk3dr$2hf$1@news.trigofacile.com> <slrns0vtnm.nbf.gerald.niel+spam@news.gegeweb.org> <ruov85$a2f$1@news.trigofacile.com> <slrns21rbm.1jhv.gerald.niel+spam@home.niel.me> <AABgIRNoBmwAAAMz.A1.flnews@WStation5.stz-e.de> <slrns24ikp.9uk.gerald.niel+spam@home.niel.me> <AABgIwHhIAEAAAoy.A1.flnews@WStation7.micha.freeshell.org> <slrns2773u.njo.gerald.niel+spam@home.niel.me> <slrns27bjv.td4.gerald.niel+spam@home.niel.me> <s01ll7$sc6$1@news.trigofacile.com> <slrns2f3eb.30mj.gerald.niel+spam@home.niel.me> <s085rs$b9p$1@news.trigofacile.com>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!apf1.newsdeef.eu!not-for-mail
Injection-Date: Sat, 13 Feb 2021 09:32:56 -0000 (UTC)
Newsgroups: news.software.nntp,news.software.readers
Content-Language: fr
Mime-Version: 1.0
Content-Transfer-Encoding: 8bit
Organization: Groupes francophones par TrigoFACILE
In-Reply-To: <s085rs$b9p$1@news.trigofacile.com>
Content-Type: text/plain; charset=utf-8; format=flowed
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:78.0) Gecko/20100101 Thunderbird/78.7.1