Just working on a sketch using an arduino DUE, ethernet shield and I'd like to incorporated the uHTTP librairy.
But when I tryed the example include with the lib, It doesn't compile when the arduino DUE is selected but it does when it is UNO.
this is the error send by the compiler:
Build options changed, rebuilding all
C:\Users\o_for\Documents\Arduino\libraries\uHTTP-master\uHTTP.cpp: In member function 'EthernetClient uHTTP::available()':
C:\Users\o_for\Documents\Arduino\libraries\uHTTP-master\uHTTP.cpp:84:52: error: 'strncmp_P' was not declared in this scope
if(strncmp_P(buffer, PSTR("OP"), 2) == 0) __method = uHTTP_METHOD_OPTIONS;
^
C:\Users\o_for\Documents\Arduino\libraries\uHTTP-master\uHTTP.cpp:149:56: error: 'strncmp_P' was not declared in this scope
if(strncmp_P(buffer, PSTR("Auth"), 4) == 0) header = AUTHORIZATION;
^
C:\Users\o_for\Documents\Arduino\libraries\uHTTP-master\uHTTP.cpp: In member function 'const char* uHTTP::parse(const char*, char*, const __FlashStringHelper*)':
C:\Users\o_for\Documents\Arduino\libraries\uHTTP-master\uHTTP.cpp:350:56: error: 'strtok_rP' was not declared in this scope
sub = strtok_rP(act, (const PROGMEM char *) sep, &ptr);
^
C:\Users\o_for\Documents\Arduino\libraries\uHTTP-master\uHTTP.cpp: In member function 'const char* uHTTP::parse(const __FlashStringHelper*, char*, const __FlashStringHelper*)':
C:\Users\o_for\Documents\Arduino\libraries\uHTTP-master\uHTTP.cpp:368:105: error: 'strncmp_P' was not declared in this scope
for(act = buffer; strncmp_P(sub, (const PROGMEM char *) needle, strlen_P((const PROGMEM char *) needle)); act = NULL){
^
C:\Users\o_for\Documents\Arduino\libraries\uHTTP-master\uHTTP.cpp:369:56: error: 'strtok_rP' was not declared in this scope
sub = strtok_rP(act, (const PROGMEM char *) sep, &ptr);
Ya! I don't believe it !! I've been able to modify the library. I only tried so far to use doc_root example and get the index.htm, so I don't know if other feature still work. I chunk it a lot
So I post code here if anyone find something wrong or want to test it.