Re: FreeTDS port to VMS V9.x on x86?

Liste des GroupesRevenir à co vms 
Sujet : Re: FreeTDS port to VMS V9.x on x86?
De : craigberry (at) *nospam* nospam.mac.com (Craig A. Berry)
Groupes : comp.os.vms
Date : 24. Jun 2025, 12:51:33
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <103e3g7$20ale$1@dont-email.me>
References : 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
User-Agent : Mozilla Thunderbird
On 6/23/25 9:35 PM, Arne Vajhøj wrote:
On 6/23/2025 10:16 PM, Arne Vajhøj wrote:
On 6/23/2025 9:49 PM, Craig A. Berry wrote:
This one looks pretty simple and depends only on vsnprintf, which has
been in VMS since 7.3-2, so it was probably in some ancient standard,
though I haven't looked yet:
>
https://github.com/jkaivo/asprintf/blob/asprintf/asprintf.h
>
It's MIT which I think can be included in a GPL project like FreeTDS. I
will try to remember to look at this when I get some other things sorted
out.
>
It could definitely be used.
>
But why not just steal the trick from it instead of the whole code?
>
The trick they use is va_copy.
>
I think tds_vasprintf could use va_copy to solve the problem as well!
 On the other side, then ditching existing code and taking this
would also switch form vfprintf to vsnprintf for length
determination, which Lawrence is correct would be
better.
It turns out tds_vasprtintf already uses vsnprintf if HAVE_VSNPRINTF is
defined and only falls back to the /dev/null hack if not:
https://github.com/FreeTDS/freetds/blob/master/src/replacements/vasprintf.c
So my next change to FreeTDS will look something like this:
--- vms/config_h.vms;-0 Tue Sep 26 09:23:25 2023
+++ vms/config_h.vms Tue Jun 24 05:23:20 2025
@@ -237,7 +237,9 @@
  #define HAVE_SNPRINTF @D_SNPRINTF@
  /* Define to 1 if you have the `vsnprintf' function. */
-#define HAVE_VSNPRINTF 0
+#if __CRTL_VER >= 70302000
+#define HAVE_VSNPRINTF 1
+#endif
  /* Define as const if the declaration of iconv() needs const. */
  #if HAVE_ICONV
[end_of_patch]
That should cover everybody with a VMS system from recent decades.

Date Sujet#  Auteur
3 Jun 25 * FreeTDS port to VMS V9.x on x86?56Richard Jordan
3 Jun 25 `* Re: FreeTDS port to VMS V9.x on x86?55Arne Vajhøj
3 Jun 25  `* Re: FreeTDS port to VMS V9.x on x86?54Arne Vajhøj
3 Jun 25   +* Re: FreeTDS port to VMS V9.x on x86?45Craig A. Berry
5 Jun 25   i`* Re: FreeTDS port to VMS V9.x on x86?44Arne Vajhøj
5 Jun 25   i `* Re: FreeTDS port to VMS V9.x on x86?43Arne Vajhøj
5 Jun 25   i  `* Re: FreeTDS port to VMS V9.x on x86?42Simon Clubley
5 Jun 25   i   `* Re: FreeTDS port to VMS V9.x on x86?41Craig A. Berry
6 Jun 25   i    `* Re: FreeTDS port to VMS V9.x on x86?40Arne Vajhøj
6 Jun 25   i     `* Re: FreeTDS port to VMS V9.x on x86?39Craig A. Berry
6 Jun 25   i      `* Re: FreeTDS port to VMS V9.x on x86?38Arne Vajhøj
6 Jun 25   i       `* Re: FreeTDS port to VMS V9.x on x86?37Craig A. Berry
6 Jun 25   i        `* Re: FreeTDS port to VMS V9.x on x86?36Arne Vajhøj
6 Jun 25   i         `* Re: FreeTDS port to VMS V9.x on x86?35Arne Vajhøj
23 Jun 25   i          `* Re: FreeTDS port to VMS V9.x on x86?34Craig A. Berry
24 Jun 25   i           `* Re: FreeTDS port to VMS V9.x on x86?33Arne Vajhøj
24 Jun 25   i            `* Re: FreeTDS port to VMS V9.x on x86?32Lawrence D'Oliveiro
24 Jun 25   i             `* Re: FreeTDS port to VMS V9.x on x86?31Arne Vajhøj
24 Jun 25   i              +* Re: FreeTDS port to VMS V9.x on x86?3Lawrence D'Oliveiro
24 Jun 25   i              i`* Re: FreeTDS port to VMS V9.x on x86?2Arne Vajhøj
24 Jun 25   i              i `- Re: FreeTDS port to VMS V9.x on x86?1Lawrence D'Oliveiro
24 Jun 25   i              `* Re: FreeTDS port to VMS V9.x on x86?27Craig A. Berry
24 Jun 25   i               `* Re: FreeTDS port to VMS V9.x on x86?26Arne Vajhøj
24 Jun 25   i                +- Re: FreeTDS port to VMS V9.x on x86?1Arne Vajhøj
24 Jun 25   i                `* Re: FreeTDS port to VMS V9.x on x86?24Arne Vajhøj
24 Jun 25   i                 `* Re: FreeTDS port to VMS V9.x on x86?23Craig A. Berry
24 Jun 25   i                  `* Re: FreeTDS port to VMS V9.x on x86?22Arne Vajhøj
25 Jun 25   i                   +* Re: FreeTDS port to VMS V9.x on x86?19Arne Vajhøj
25 Jun 25   i                   i`* Re: FreeTDS port to VMS V9.x on x86?18Craig A. Berry
1 Jul 25   i                   i `* Re: FreeTDS port to VMS V9.x on x86?17Arne Vajhøj
2 Jul 25   i                   i  +- Re: FreeTDS port to VMS V9.x on x86?1Lawrence D'Oliveiro
3 Jul16:05   i                   i  `* Re: FreeTDS port to VMS V9.x on x86?15Arne Vajhøj
3 Jul18:40   i                   i   `* Re: FreeTDS port to VMS V9.x on x86?14Dan Cross
3 Jul19:15   i                   i    `* Re: FreeTDS port to VMS V9.x on x86?13Arne Vajhøj
3 Jul21:07   i                   i     +* Re: FreeTDS port to VMS V9.x on x86?9Dan Cross
3 Jul23:31   i                   i     i+* Re: FreeTDS port to VMS V9.x on x86?6Craig A. Berry
4 Jul01:24   i                   i     ii+* Re: FreeTDS port to VMS V9.x on x86?4Arne Vajhøj
4 Jul02:00   i                   i     iii`* Re: FreeTDS port to VMS V9.x on x86?3Craig A. Berry
4 Jul02:14   i                   i     iii `* Re: FreeTDS port to VMS V9.x on x86?2Arne Vajhøj
4 Jul05:38   i                   i     iii  `- Re: FreeTDS port to VMS V9.x on x86?1Dan Cross
4 Jul05:31   i                   i     ii`- Re: FreeTDS port to VMS V9.x on x86?1Dan Cross
4 Jul01:21   i                   i     i`* Re: FreeTDS port to VMS V9.x on x86?2Arne Vajhøj
4 Jul06:06   i                   i     i `- Re: FreeTDS port to VMS V9.x on x86?1Dan Cross
4 Jul01:51   i                   i     `* Re: FreeTDS port to VMS V9.x on x86?3Lawrence D'Oliveiro
4 Jul02:21   i                   i      `* Re: FreeTDS port to VMS V9.x on x86?2Arne Vajhøj
4 Jul02:41   i                   i       `- Re: FreeTDS port to VMS V9.x on x86?1Lawrence D'Oliveiro
27 Jun 25   i                   `* Re: FreeTDS port to VMS V9.x on x86?2Lawrence D'Oliveiro
1 Jul 25   i                    `- Re: FreeTDS port to VMS V9.x on x86?1Arne Vajhøj
3 Jun 25   +- Re: FreeTDS port to VMS V9.x on x86?1Richard Jordan
14 Jun 25   `* Re: FreeTDS port to VMS V9.x on x86?7Arne Vajhøj
15 Jun 25    `* Re: FreeTDS port to VMS V9.x on x86?6Lawrence D'Oliveiro
15 Jun 25     `* Re: FreeTDS port to VMS V9.x on x86?5Arne Vajhøj
15 Jun 25      `* Re: FreeTDS port to VMS V9.x on x86?4Lawrence D'Oliveiro
16 Jun 25       `* Re: FreeTDS port to VMS V9.x on x86?3Arne Vajhøj
16 Jun 25        `* Re: FreeTDS port to VMS V9.x on x86?2Lawrence D'Oliveiro
16 Jun 25         `- Re: FreeTDS port to VMS V9.x on x86?1Arne Vajhøj

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal