Forums before death by AOL, social media and spammers... "We can't have nice things"
|    comp.os.vms    |    DEC's VAX* line of computers & VMS.    |    264,096 messages    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
|    Message 262,707 of 264,096    |
|    Craig A. Berry to All    |
|    Re: FreeTDS port to VMS V9.x on x86?    |
|    23 Jun 25 20:49:10    |
      From: craigberry@nospam.mac.com              On 6/23/25 7:40 PM, Arne Vajhøj wrote:       > On 6/23/2025 8:37 PM, Lawrence D'Oliveiro wrote:       >> On Mon, 23 Jun 2025 20:17:57 -0400, Arne Vajhøj wrote:       >>> Unfortunately that means that the entire fallback algorithm       >>> in tds_vasprintf (write to null device to find output size,       >>> allocate buffer of correct size and then write to buffer)       >>> is broken.              Thanks for chasing that down.              >> What a dumb way to do it. Using the null device means making OS I/O calls       >> -- needless overhead just to find out how long a string -- which is being       >> put together entirely in userland -- needs to be.       >       > Fallback algorithms are often primitive.       >       > But if you have a simple better way of achieving it then please send       > the code to Craig so he can send it upstream.              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.              --- SoupGate-Win32 v1.05        * Origin: you cannot sedate... all the things you hate (1:229/2)    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
(c) 1994, bbs@darkrealms.ca