Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.c > #60413

Re: Please critique my strdupf library

From Keith Thompson <kst-u@mib.org>
Newsgroups comp.lang.c
Subject Re: Please critique my strdupf library
Date 2015-04-19 07:44 -0700
Organization None to speak of
Message-ID <87lhhop47w.fsf@kst-u.example.com> (permalink)
References <6df1a933-2ba8-41f6-a169-f622244f0b66@googlegroups.com> <cph8b1Fl1o8U10@mid.individual.net> <024c6079-c0a2-4cc2-b7ce-bad387017f2f@googlegroups.com> <cphb74Fo15hU1@mid.individual.net>

Show all headers | View raw


Ian Collins <ian-news@hotmail.com> writes:
> samuelallenalexander@gmail.com wrote:
[...]
>>  From my literature review, I got the impression va_copy is rather
>> finicky on pre-C99, see the bottom section here:
>> http://www.gnu.org/software/libc/manual/html_node/Argument-Macros.html
>>
>> I guess I should mention that in a comment, thank you for the pointer.
>
> Well I was using them in the mid 80's, so I guess there might be
> really old compilers that don't have them.  I wouldn't bother looking
> back that far!

va_start, va_arg, and va_end go babck to C89/C90.  va_copy was
introduced in C99.  There could be compilers that don't support it.
(Microsoft's compiler is the usual suspect for this kind of thing,
but apparently it does support it.)

I haven't studied the code; I wonder if you can modify it to avoid
using va_copy (if you care about pre-C99 portability).

-- 
Keith Thompson (The_Other_Keith) kst-u@mib.org  <http://www.ghoti.net/~kst>
Working, but not speaking, for JetHead Development, Inc.
"We must do something.  This is something.  Therefore, we must do this."
    -- Antony Jay and Jonathan Lynn, "Yes Minister"

Back to comp.lang.c | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Please critique my strdupf library samuelallenalexander@gmail.com - 2015-04-19 01:34 -0700
  Re: Please critique my strdupf library Ian Collins <ian-news@hotmail.com> - 2015-04-19 20:46 +1200
    Re: Please critique my strdupf library samuelallenalexander@gmail.com - 2015-04-19 02:25 -0700
      Re: Please critique my strdupf library Ian Collins <ian-news@hotmail.com> - 2015-04-19 21:35 +1200
        Re: Please critique my strdupf library Keith Thompson <kst-u@mib.org> - 2015-04-19 07:44 -0700
          Re: Please critique my strdupf library samuelallenalexander@gmail.com - 2015-04-19 10:23 -0700
            Re: Please critique my strdupf library Morris Dovey <mrdovey@iedu.com> - 2015-04-19 13:09 -0500
      Re: Please critique my strdupf library fir <profesor.fir@gmail.com> - 2015-04-19 02:48 -0700
        Re: Please critique my strdupf library samuelallenalexander@gmail.com - 2015-04-19 03:42 -0700
  Re: Please critique my strdupf library fir <profesor.fir@gmail.com> - 2015-04-19 02:11 -0700
  Re: Please critique my strdupf library Ben Bacarisse <ben.usenet@bsb.me.uk> - 2015-04-19 11:11 +0100
    Re: Please critique my strdupf library samuelallenalexander@gmail.com - 2015-04-19 04:36 -0700
      Re: Please critique my strdupf library Johannes Bauer <dfnsonfsduifb@gmx.de> - 2015-04-19 15:41 +0200
        Re: Please critique my strdupf library samuelallenalexander@gmail.com - 2015-04-19 07:28 -0700
  Re: Please critique my strdupf library August Karlstrom <fusionfile@gmail.com> - 2015-04-19 12:12 +0200
  Re: Please critique my strdupf library Johannes Bauer <dfnsonfsduifb@gmx.de> - 2015-04-19 13:25 +0200
    Re: Please critique my strdupf library Ben Bacarisse <ben.usenet@bsb.me.uk> - 2015-04-19 13:32 +0100
  Re: Please critique my strdupf library Lőrinczy Zsigmond <nospam@for.me> - 2015-04-19 16:29 +0200
  Re: Please critique my strdupf library Keith Thompson <kst-u@mib.org> - 2015-04-19 07:52 -0700

csiph-web