<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Another system include file issue (stat.h) in LPCXpresso IDE</title>
    <link>https://community.nxp.com/t5/LPCXpresso-IDE/Another-system-include-file-issue-stat-h/m-p/560939#M16098</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by robert.palmer on Fri Apr 13 08:56:17 MST 2012&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm using v4.2.2_275 of LPCXpresso&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm using FreeRTOS&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;and I'm using REDLIB&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The FreeRTOS syscalls.c file includes stat.h:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;#include &amp;lt;sys/stat.h&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The file it finds is in:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;C:\nxp\LPCXpresso_4.2.2_275\lpcxpresso\Tools\arm-non-eabi\include\sys&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;However, this file contains the following:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;#if !defined(__CR2_SYS_STAT_H__)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;#&amp;nbsp; define __CR2_SYS_STAT_H__&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;#&amp;nbsp; if defined(__REDLIB__)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;#&amp;nbsp;&amp;nbsp;&amp;nbsp; include_next &amp;lt;sys/stat.h&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;#&amp;nbsp; else&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;#&amp;nbsp;&amp;nbsp;&amp;nbsp; include &amp;lt;newlib_inc/sys/stat.h&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;#&amp;nbsp;&amp;nbsp;&amp;nbsp; if !defined (__NEWLIB__) &amp;amp;&amp;amp; !defined(__LIBRARY_WARNING_MESSAGE__)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;#&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; warning "Either __NEWLIB__ or __REDLIB__ should be defined when using the C library. Defaulting to __NEWLIB__"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;#&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; define __LIBRARY_WARNING_MESSAGE__&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;#&amp;nbsp;&amp;nbsp;&amp;nbsp; endif&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;#&amp;nbsp; endif&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;#endif&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Notice that with __REDLIB__ defined - which is my case, it does an &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;#include_next &amp;lt;sys/stat.h&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;so it continues searching the path for another stat.h - which does not exist.&amp;nbsp; Where should this come from?&amp;nbsp; What can I do to get this working (aside from switching to NEWLIB)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Is there some DETAILED documentation of RedLib - that defines EXACTLY what it does and does not support.&amp;nbsp; I know it's CodeRed's version of the standard C library, but it is obviously trimmed down in some way or there would be no point of creating a custom version.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 16 Jun 2016 00:51:09 GMT</pubDate>
    <dc:creator>lpcware</dc:creator>
    <dc:date>2016-06-16T00:51:09Z</dc:date>
    <item>
      <title>Another system include file issue (stat.h)</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/Another-system-include-file-issue-stat-h/m-p/560939#M16098</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by robert.palmer on Fri Apr 13 08:56:17 MST 2012&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm using v4.2.2_275 of LPCXpresso&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm using FreeRTOS&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;and I'm using REDLIB&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The FreeRTOS syscalls.c file includes stat.h:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;#include &amp;lt;sys/stat.h&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The file it finds is in:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;C:\nxp\LPCXpresso_4.2.2_275\lpcxpresso\Tools\arm-non-eabi\include\sys&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;However, this file contains the following:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;#if !defined(__CR2_SYS_STAT_H__)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;#&amp;nbsp; define __CR2_SYS_STAT_H__&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;#&amp;nbsp; if defined(__REDLIB__)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;#&amp;nbsp;&amp;nbsp;&amp;nbsp; include_next &amp;lt;sys/stat.h&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;#&amp;nbsp; else&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;#&amp;nbsp;&amp;nbsp;&amp;nbsp; include &amp;lt;newlib_inc/sys/stat.h&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;#&amp;nbsp;&amp;nbsp;&amp;nbsp; if !defined (__NEWLIB__) &amp;amp;&amp;amp; !defined(__LIBRARY_WARNING_MESSAGE__)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;#&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; warning "Either __NEWLIB__ or __REDLIB__ should be defined when using the C library. Defaulting to __NEWLIB__"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;#&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; define __LIBRARY_WARNING_MESSAGE__&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;#&amp;nbsp;&amp;nbsp;&amp;nbsp; endif&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;#&amp;nbsp; endif&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;#endif&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Notice that with __REDLIB__ defined - which is my case, it does an &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;#include_next &amp;lt;sys/stat.h&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;so it continues searching the path for another stat.h - which does not exist.&amp;nbsp; Where should this come from?&amp;nbsp; What can I do to get this working (aside from switching to NEWLIB)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Is there some DETAILED documentation of RedLib - that defines EXACTLY what it does and does not support.&amp;nbsp; I know it's CodeRed's version of the standard C library, but it is obviously trimmed down in some way or there would be no point of creating a custom version.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jun 2016 00:51:09 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/Another-system-include-file-issue-stat-h/m-p/560939#M16098</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-16T00:51:09Z</dc:date>
    </item>
    <item>
      <title>Re: Another system include file issue (stat.h)</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/Another-system-include-file-issue-stat-h/m-p/560940#M16099</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by whitecoe on Fri Apr 13 12:30:52 MST 2012&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;stat.h isn't a standard ANSI/ISO C90 header, which is what &lt;/SPAN&gt;&lt;A href="http://http://support.code-red-tech.com/CodeRedWiki/RedlibAndNewlib"&gt;Redlib provides&lt;/A&gt;&lt;SPAN&gt;. The standard C library is as documented in &lt;/SPAN&gt;&lt;A href="http://http://www.amazon.com/The-Standard-Library-P-J-Plauger/dp/0131315099"&gt;Plauger's book&lt;/A&gt;&lt;SPAN&gt;. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;A good online reference for the C90 C library IMHO is...&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://"&gt;http://www.cplusplus.com/reference/clibrary/&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;stat.h is a &lt;/SPAN&gt;&lt;A href="http://http://en.wikipedia.org/wiki/C_POSIX_library"&gt;POSIX&lt;/A&gt;&lt;SPAN&gt; library header.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;HTH!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jun 2016 00:51:09 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/Another-system-include-file-issue-stat-h/m-p/560940#M16099</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-16T00:51:09Z</dc:date>
    </item>
  </channel>
</rss>

