[Info-vax] strtok_r on Compaq C V6.4-005 on OpenVMS VAX V7.3
Steven Schweda
sms.antinode at gmail.com
Sun Oct 21 09:32:10 EDT 2012
On Oct 21, 5:53 am, Stuart Martin <mister.wa... at gmail.com> wrote:
> Hi - I can't find a header in my C install for strtok_r (strtok is in <string.h>).
>
> Anyone know if one exists in this version of C?
If you don't have it in your header files, then you
probably don't have it. A newer ("HP C V7.3-009 on OpenVMS
Alpha V8.3") header file says:
[...]
/*
** X/Open extended
*/
#if defined _XOPEN_SOURCE_EXTENDED || !defined _ANSI_C_SOURCE
# if __INITIAL_POINTER_SIZE == 32
# pragma __pointer_size 32
# endif
# if __CRTL_VER >= 70000000
char *strdup(__const_char_ptr64);
# endif
# if __CRTL_VER >= 70301000
char *strtok_r(char *__s, __const_char_ptr64 __sep, char **lasts);
# endif
#endif
[...]
I know nothing, and my patch access is not what it once
was, but I'd guess that you'd need VMS V7.3-1 to get that
"__CRTL_VER >= 70301000", and, unless there's some magic CRTL
patch, that looks unlikely on VAX. Some cURL code I found
lying around ("...curl-7_21_1.packages.vms]config-vms.h")
says:
[...]
/* Define if you have the `strtok_r' function. */
/* Condition lifted from <string.h> */
#if __CRTL_VER >= 70301000
# define HAVE_STRTOK_R 1
#endif
[...]
And cURL supplies its own lib/strtok.c which includes a
strtok_r(). For Wget, I just said that it's always missing,
and used the GNU lib/strtok_r.c which came in the kit.
More information about the Info-vax
mailing list