delorie.com/archives/browse.cgi | search |
X-Authentication-Warning: | delorie.com: mail set sender to djgpp-workers-bounces using -f |
From: | <ams AT ludd DOT ltu DOT se> |
Message-Id: | <200501012001.j01K1YMM023795@speedy.ludd.ltu.se> |
Subject: | Re: More complaints from tests/libclink/check |
In-Reply-To: | <m4ect01p964inq4g0pb0dtk3u90p4e3mn2@4ax.com> "from Brian Inglis |
at Dec 31, 2004 11:01:02 pm" | |
To: | djgpp-workers AT delorie DOT com |
Date: | Sat, 1 Jan 2005 21:01:34 +0100 (CET) |
X-Mailer: | ELM [version 2.4ME+ PL78 (25)] |
MIME-Version: | 1.0 |
X-ltu-MailScanner-Information: | Please contact the ISP for more information |
X-ltu-MailScanner: | Found to be clean |
X-MailScanner-From: | ams AT ludd DOT ltu DOT se |
Reply-To: | djgpp-workers AT delorie DOT com |
Errors-To: | nobody AT delorie DOT com |
X-Mailing-List: | djgpp-workers AT delorie DOT com |
X-Unsubscribes-To: | listserv AT delorie DOT com |
According to Brian Inglis: > On Sat, 01 Jan 2005 04:13:50 +0100 (CET), ams AT ludd DOT ltu DOT se wrote: > >You just define your (POSIX) functions that does the real work, adding > >them as stubs to <libc/stubs.h> and letting the C (89 or 99) call them > >as necessary. > > I am not sure what you mean by stubs here? I implemented strtok_r() yesterday. This is what I did. 1. Move strtok.c to strtok_r.c (note: different directories). 2. Edit strtok_r.c to have the right parameters and adjust code for "function parameter memory" instead of static variable. 3. Add strtok_r.c to makefile. 4. Add new strtok() in strtok.c that calls strtok_r(). 5. 4 means that strtok_r will pollute ansi namespace, hence I added strtok_r to <libc/stubs.h>. Added #include <libc/stubs.h> to strtok.c and strtok_r.c. (Actually I haven't done this yet, but will.) 6. Copied strtok.txh to strtok_r.txh and adjusted it accordingly. Questions? Right, MartinS
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |