Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.c > #389746
| From | Michael S <already5chosen@yahoo.com> |
|---|---|
| Newsgroups | comp.lang.c |
| Subject | Re: Something like string-streams existing in "C"? |
| Date | 2024-12-19 22:04 +0200 |
| Organization | A noiseless patient Spider |
| Message-ID | <20241219220435.00001140@yahoo.com> (permalink) |
| References | <vjvsvb$2i07u$1@dont-email.me> <vk179b$2s9oa$1@bluemanedhawk.eternal-september.org> <20241219114135.611@kylheku.com> |
On Thu, 19 Dec 2024 19:47:28 -0000 (UTC)
Kaz Kylheku <643-408-1753@kylheku.com> wrote:
> On 2024-12-19, BlueManedHawk <bluemanedhawk@invalid.invalid> wrote:
> > The ‘asprintf’ subroutine is standardized by POSIX.1-2024, meaning
> > that you can use it now and blame somebody else if it doesn't work.
> > If you
>
> Regardless of how it is made visible, you can detect it via a compile
> test in a configure script, and provide your own if it wasn't found:
>
> #if !HAVE_ASPRINTF
>
> int asprintf(char **out, const char *fmt, ...)
> {
> ... // more or less trivial to implement using malloc, realloc and
> vsprintf
Don't you mean, vsnprintf ?
> }
>
> #endif
>
> BTW, is there no wchar_t version of this?
>
> > can't target POSIX, the subroutine is also _theoretically_
> > available through the feature-test macro ‘__STDC_WANT_LIB_EXT2__’,
> > assuming that ‘__STDC_ALLOC_LIB__’ is a predefined macro, but gLibC
> > does not pay
>
> When would it be the case that you can't target POSIX, but *can* mess
> around with some the internal feature test macros of some specific
> POSIX vendor? :)
>
>
Back to comp.lang.c | Previous | Next — Previous in thread | Next in thread | Find similar
Something like string-streams existing in "C"? Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2024-12-19 02:30 +0100
Re: Something like string-streams existing in "C"? Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2024-12-18 18:14 -0800
Re: Something like string-streams existing in "C"? Lawrence D'Oliveiro <ldo@nz.invalid> - 2024-12-19 04:41 +0000
Re: Something like string-streams existing in "C"? BlueManedHawk <bluemanedhawk@invalid.invalid> - 2024-12-19 08:32 -0500
Re: Something like string-streams existing in "C"? Kaz Kylheku <643-408-1753@kylheku.com> - 2024-12-19 19:47 +0000
Re: Something like string-streams existing in "C"? Michael S <already5chosen@yahoo.com> - 2024-12-19 22:04 +0200
Re: Something like string-streams existing in "C"? Kaz Kylheku <643-408-1753@kylheku.com> - 2024-12-19 22:06 +0000
Re: Something like string-streams existing in "C"? Thiago Adams <thiago.adams@gmail.com> - 2024-12-19 23:14 -0300
Re: Something like string-streams existing in "C"? Michael S <already5chosen@yahoo.com> - 2024-12-20 13:00 +0200
Re: Something like string-streams existing in "C"? Thiago Adams <thiago.adams@gmail.com> - 2024-12-20 08:32 -0300
Re: Something like string-streams existing in "C"? Michael S <already5chosen@yahoo.com> - 2024-12-20 14:55 +0200
Re: Something like string-streams existing in "C"? Lawrence D'Oliveiro <ldo@nz.invalid> - 2024-12-20 20:39 +0000
Re: Something like string-streams existing in "C"? Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2024-12-20 10:45 -0800
Re: Something like string-streams existing in "C"? Michael S <already5chosen@yahoo.com> - 2024-12-20 12:38 +0200
Re: Something like string-streams existing in "C"? scott@slp53.sl.home (Scott Lurndal) - 2024-12-19 13:53 +0000
Re: Something like string-streams existing in "C"? Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2024-12-20 03:56 +0100
csiph-web