• SLRN build fail on macOS

    From =?UTF-8?Q?Julien_=c3=89LIE?=@21:1/5 to All on Wed Feb 10 23:10:41 2021
    Bonsoir Gérald,

    Thanks to Jean-Pierre Kuypers on fr.*, the problem is known but the
    author of the patch says that he doesn't find where to submit it: https://trac.macports.org/ticket/61662

    After 4 years without any changes in slrn source code, there have been 3 commits upstream last month from "jedsoft":
    https://github.com/arafel/slrn/commits/master

    So indeed the best move would be to contact that person (John E. Davis - http://www.jedsoft.org/) as well as the slrn-user mailing-list (only 6
    messages in 2020 according to Gmane archives...).


    Note that the patch is related to "configure". The real file to be
    patched upstream is autoconf/configure.ac, which contains the initial definition:

    AC_DEFUN(CF_VA_COPY,
    [
    dnl# va_copy checks taken from glib 1.2.8
    dnl#
    dnl# we currently check for all three va_copy possibilities, so we get
    dnl# all results in config.log for bug reports.
    AC_MSG_CHECKING(for an implementation of va_copy()) AC_CACHE_VAL(slrn_cv_va_copy,[
    AC_RUN_IFELSE([AC_LANG_SOURCE([[
    #include <stdarg.h>
    void f (int i, ...) {

    [...]



    I believe they should use instead the following portable code from
    rra-c-util:

    /*
    * 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 ÉLIE

    « Quelle folie, Ô Astérix, que de t'être venu fourrer dans la gueule de
    la louve romaine. » (Astérix)

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From =?UTF-8?Q?G=C3=A9rald?= Niel@21:1/5 to All on Sat Feb 13 08:28:59 2021
    Le Mercredi 10 février 2021 à 22:10 UTC, Julien ÉLIE écrivait sur news.software.nntp :

    I believe they should use instead the following portable code from rra-c-util:

    /*
    * 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

    As I said, it's beyond my skills or knowledge.
    What is the file to patch with this?
    Anything else to modify?

    I could test, and if it works submit the patch to the Git repository. ;)

    @+
    --
    On ne le dira jamais assez, l'anarchisme, c'est l'ordre sans le
    gouvernement ; c'est la paix sans la violence. C'est le contraire
    précisément de tout ce qu'on lui reproche, soit par ignorance, soit
    par mauvaise foi. -+- Hem Day -+-

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From =?UTF-8?Q?Julien_=c3=89LIE?=@21:1/5 to All on Sat Feb 13 10:32:56 2021
    XPost: news.software.readers

    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.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From =?UTF-8?Q?Julien_=c3=89LIE?=@21:1/5 to All on Sat Feb 13 10:24:12 2021
    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.

    --
    Julien ÉLIE

    « – À la plage ? Mais il pleut !
    – Pas du tout ! Dans le midi de la Gaule, il pleut. Ici, c'est tout
    juste un peu humide. Vivifiant. Pas vrai, Astérix ?
    – Ce matin, ça devient de plus en plus vivifiant ! » (Astérix)

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From =?UTF-8?Q?G=C3=A9rald?= Niel@21:1/5 to All on Sat Feb 13 12:23:53 2021
    XPost: news.software.readers

    [Followup-To: news.software.readers]

    Le Samedi 13 février 2021 à 09:24 UTC, Julien ÉLIE écrivait sur news.software.nntp :

    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.

    Thanks, it works.

    I will be able to test the patch for the libcanlock v3.

    @+
    --
    On ne le dira jamais assez, l'anarchisme, c'est l'ordre sans le
    gouvernement ; c'est la paix sans la violence. C'est le contraire
    précisément de tout ce qu'on lui reproche, soit par ignorance, soit
    par mauvaise foi. -+- Hem Day -+-

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)