Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 4 of 4

Thread: Teensy 4.1 <string.h.

  1. #1
    Senior Member
    Join Date
    Feb 2015
    Posts
    117

    Teensy 4.1 <string.h.

    Is char * strcasestr (const char *, const char *) __ATTR_PURE__ supported?

    When I try to include it I get "error: 'strcasestr' was not declared in this scope" but strstr is fine : "!strstr(tempname, "PID")".

    Thanks

    Bruce

  2. #2
    Senior Member+ KurtE's Avatar
    Join Date
    Jan 2014
    Posts
    9,219
    Sorry, not sure where you are seeing that definition: char * strcasestr (const char *, const char *) __ATTR_PURE__

    I don't see anywhere within the Arduino install for Teensy or arm that uses __ATTR_PURE__

    I do see that function in the arm include file on my machine: C:\arduino-1.8.15\hardware\tools\arm\arm-none-eabi\include\string.h

    but it is under some #if:
    Code:
    #if __GNU_VISIBLE
    int	 strcasecmp_l (const char *, const char *, locale_t);
    int	 strncasecmp_l (const char *, const char *, size_t, locale_t);
    #endif
    Not sure if __GNU_VISIBLE which depends on _GNU_SOURCE ...

  3. #3
    Senior Member
    Join Date
    Feb 2015
    Posts
    117
    Standard C library for AVR-GCC: https://www.nongnu.org/avr-libc/user-manual/index.html

    Thanks

    Bruce

  4. #4
    Senior Member+ KurtE's Avatar
    Join Date
    Jan 2014
    Posts
    9,219
    Quote Originally Posted by bvernham View Post
    Note: Teensy 3.x, LC, and T4.x are all ARM based processors not AVR, so a different version of the library would be used.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •