When I write an application that uses both sockets and file I/O I am getting bitten over and over again by our apparent #define of the common POSIX APIs called write(), read(), close() etc. When I attempt to use POSIX I/O to read and write files, these appear to be macro re-defined to "lwip_<function>" which is obviously wrong. In addition, I am finding that if I create a C++ class such as:
class MyClass {
void write(char *data);
}
attempting to call the write() method of my class also appears to be affected by the sockets redefines. I haven't considered why macro re-defines were chosen or what we might do to alleviate the situation ... but I am of an opinion we need to try and do "something" to find this issue.
[Answered] Being bitten by #defines for write, read and close (etc)
[Answered] Being bitten by #defines for write, read and close (etc)
Last edited by kolban on Mon May 22, 2017 12:05 am, edited 1 time in total.
Free book on ESP32 available here: https://leanpub.com/kolban-ESP32
Who is online
Users browsing this forum: No registered users and 78 guests