🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: news.software.readers
4 messages
4 total messages Started by Julien ÉLIE Sat, 13 Feb 2021 09:32
Re: SLRN build fail on macOS
#264561
Author: 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.
Re: SLRN build fail on macOS
#264701
Author: Paul Walker
Date: Tue, 16 Feb 2021 14:44
22 lines
2578 bytes
On Sat, 13 Feb 2021 10:32:56 +0100, Julien ÉLIE wrote:

> 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)

If you get an answer I'd like to know. :-) I've posted to slrn-user (and
direct to JED) but without any reply yet.

Just FYI, I've got a clone of the slrn repo at https://github.com/arafel/slrn/

I haven't done much with it yet.  I'm thinking of keeping a branch to track
upstream (if there are any changes) and actually merging changes into the
master/main - at least that way there's somewhere with updated changes.

Do you want to (or do you want me to) add your VA_COPY code to the repo?

Thanks

-- 
Paul
Re: SLRN build fail on macOS
#264700
Author: Julien ÉLIE
Date: Tue, 16 Feb 2021 21:26
24 lines
2800 bytes
Hi Paul,
> Just FYI, I've got a clone of the slrn repo at https://github.com/arafel/slrn/
> 
> I haven't done much with it yet.  I'm thinking of keeping a branch to track
> upstream (if there are any changes) and actually merging changes into the
> master/main - at least that way there's somewhere with updated changes.

That's a great initiative, thanks!


> Do you want to (or do you want me to) add your VA_COPY code to the repo?

Please do if you want, either by just adding missing code in src/misc.c 
(straight-forward, but which duplicates code) or much cleaner by fixing 
the detection code in autoconf/configure.ac (which lacks inclusions of 
<stdlib.h> as shown in a patch at 
<https://trac.macports.org/ticket/61662>) and then regenerate the 
configure script.

-- 
Julien ÉLIE

« Les amis de la vérité sont ceux qui la cherchent, et non ceux qui se
   vantent de l'avoir trouvée. » (Condorcet)
Re: SLRN build fail on macOS
#264704
Author: Paul Walker
Date: Fri, 19 Feb 2021 10:33
12 lines
2050 bytes
On Tue, 16 Feb 2021 22:26:02 +0100, Julien ÉLIE wrote:

>> Do you want to (or do you want me to) add your VA_COPY code to the repo?
> Please do if you want, either by just adding missing code in src/misc.c 
> (straight-forward, but which duplicates code) or much cleaner by fixing 

I'm afraid I don't speak autoconf (yet?); I've sent you an email.

Thanks

-- 
Paul
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads