ESP8266 Developer Zone The Official ESP8266 Forum 2015-11-14T11:49:34+08:00 https://bbs.espressif.com:443/feed.php?f=7&t=1369 2015-11-14T11:49:34+08:00 2015-11-14T11:49:34+08:00 https://bbs.espressif.com:443/viewtopic.php?t=1369&p=4582#p4582 <![CDATA[Re: does ESP8266 supply stroul strncasecmp() and stroul ()?]]>
thank you for your help。 strncasscmp () and stroul() seems working now 。

then when there is warning about strcasecmp()

warning : implicit declaration of function 'strcasecmp' [-Wimplicit-function-declaration]

and i found the esp_libc.h, and i found there is nothing declaration about this function,

so i copy the strcasecmp() soucce code and complies it as like before.

when complies,it showing me a error:

1> C:\SysGCC\esp8266\esp8266-bsp/RTOS-SDK/lib\libminic.a(minic.o): In function `strcasecmp':
1> (.irom0.text+0x2dc): multiple definition of `strcasecmp'




so if esp_libc.h have not declare this function, could i just ignore the implicit warning?

Statistics: Posted by marhc_seven — Sat Nov 14, 2015 11:49 am


]]>
2015-11-13T12:44:23+08:00 2015-11-13T12:44:23+08:00 https://bbs.espressif.com:443/viewtopic.php?t=1369&p=4561#p4561 <![CDATA[Re: does ESP8266 supply stroul strncasecmp() and stroul ()?]]>
Please study them and compare them to what you had previously and see if you can't understand what was changed to get them working so that your own skills will grow.

Statistics: Posted by kolban — Fri Nov 13, 2015 12:44 pm


]]>
2015-11-13T10:40:31+08:00 2015-11-13T10:40:31+08:00 https://bbs.espressif.com:443/viewtopic.php?t=1369&p=4558#p4558 <![CDATA[Re: does ESP8266 supply stroul strncasecmp() and stroul ()?]]>
kolban wrote:
I think the trick here is to realize that the function called strncasecmp() and stroul() are speced out in posix:

http://pubs.opengroup.org/onlinepubs/00 ... secmp.html

http://pubs.opengroup.org/onlinepubs/00 ... rtoul.html

Which means that we fully understand their specification interface. i.e. we know what they should do. We have samples of implementations of these functions in C on the Internet. The last step is to compile those on an ESP8266 platform. Taking the source files directly from the internet may not work exactly as is ... but should work if one is skilled in C programming or can find folks skilled in C programming. The ESP8266 SDK should provide the "parts" needed for ESP8266 programming but should not be responsible for providing libraries that are not ESP related (eg. string manipulation functions).



could you please teach me how to complies the stroul() function in the SDK?


i am really don't know how to solve it 。


there is not ctype.h and it causes isspace() function undefined
so i adding the the isspace() c in it , although there are two function, one is supplied by apple and other is supplied by Google

Apple:
int isspace(c)
int c;
{
return (c == '\t' || c == '\n' ||
c == '\v' || c == '\f' || c == '\r' || c == ' ' ? 1 : 0);
}

Google:
int isspace(int c)
{
return ((c>=0x09 && c<=0x0D) || (c==0x20));
}


when it was ok , i found that UCHAR is warning that it is implicit decalaration of function ’UCHAR' is invalid in C99
i just ignore it.


But there is other error that shows ULONG_MAX have not defined~~~~

so i Google it , and i have define it as
#define ULONG_MAX 0xFFFFFFFFUL


when all figure out ,

there is a error that shows me :


result * = 10;
result * = base;

......

inexhaustible !!!!!!

how could i solve it !!!!!!???????

Statistics: Posted by marhc_seven — Fri Nov 13, 2015 10:40 am


]]>
2015-11-13T09:22:25+08:00 2015-11-13T09:22:25+08:00 https://bbs.espressif.com:443/viewtopic.php?t=1369&p=4557#p4557 <![CDATA[Re: does ESP8266 supply stroul strncasecmp() and stroul ()?]]>
you are right , that is esay for the skilled one。


but i am not , just tring !!!

Statistics: Posted by marhc_seven — Fri Nov 13, 2015 9:22 am


]]>
2015-11-12T22:39:15+08:00 2015-11-12T22:39:15+08:00 https://bbs.espressif.com:443/viewtopic.php?t=1369&p=4554#p4554 <![CDATA[Re: does ESP8266 supply stroul strncasecmp() and stroul ()?]]>
http://pubs.opengroup.org/onlinepubs/00 ... secmp.html

http://pubs.opengroup.org/onlinepubs/00 ... rtoul.html

Which means that we fully understand their specification interface. i.e. we know what they should do. We have samples of implementations of these functions in C on the Internet. The last step is to compile those on an ESP8266 platform. Taking the source files directly from the internet may not work exactly as is ... but should work if one is skilled in C programming or can find folks skilled in C programming. The ESP8266 SDK should provide the "parts" needed for ESP8266 programming but should not be responsible for providing libraries that are not ESP related (eg. string manipulation functions).

Statistics: Posted by kolban — Thu Nov 12, 2015 10:39 pm


]]>
2015-11-12T19:17:37+08:00 2015-11-12T19:17:37+08:00 https://bbs.espressif.com:443/viewtopic.php?t=1369&p=4552#p4552 <![CDATA[Re: does ESP8266 supply stroul strncasecmp() and stroul ()?]]>
that is a question。

as i reply you before。

the source depend on other files

#include "tclInt.h"
#include "tclPort.h"
#include <ansidecl.h>


and as we know lowly ESP8266 do not supply those files~~~


:( :( :( :( :( :( :( :( :( :( :( :( :( :( :x :x :x :x :x :x :x :x :x :x :x

Statistics: Posted by marhc_seven — Thu Nov 12, 2015 7:17 pm


]]>
2015-11-12T17:28:53+08:00 2015-11-12T17:28:53+08:00 https://bbs.espressif.com:443/viewtopic.php?t=1369&p=4545#p4545 <![CDATA[Re: does ESP8266 supply stroul strncasecmp() and stroul ()?]]>
#include "tclInt.h"
#include "tclPort.h"

BR!

Statistics: Posted by marhc_seven — Thu Nov 12, 2015 5:28 pm


]]>
2015-11-12T14:30:37+08:00 2015-11-12T14:30:37+08:00 https://bbs.espressif.com:443/viewtopic.php?t=1369&p=4542#p4542 <![CDATA[Re: does ESP8266 supply stroul strncasecmp() and stroul ()?]]>
http://www.opensource.apple.com/source/ ... /strtoul.c

http://www.opensource.apple.com/source/ ... ncasecmp.c

If they are not part of any existing library, you can always build your own utility library using these sources.

Statistics: Posted by kolban — Thu Nov 12, 2015 2:30 pm


]]>
2015-11-12T13:35:38+08:00 2015-11-12T13:35:38+08:00 https://bbs.espressif.com:443/viewtopic.php?t=1369&p=4540#p4540 <![CDATA[does ESP8266 supply stroul strncasecmp() and stroul ()?]]>
my project need to using strncasecmp() and stroul ()

but those function do not being included in esplibc.h ,how could we do?

BR

Statistics: Posted by marhc_seven — Thu Nov 12, 2015 1:35 pm


]]>