configure CC support, strrchr over rindex

This commit is contained in:
van Hauser 2017-01-31 11:03:00 +01:00
parent 5ae15317c6
commit 9c3feee9b6
5 changed files with 27 additions and 18 deletions

View file

@ -21,10 +21,10 @@ char *smtp_read_server_capacity(int sock) {
buf[strlen(buf) - 1] = 0;
if (buf[strlen(buf) - 1] == '\r')
buf[strlen(buf) - 1] = 0;
#ifdef NO_RINDEX
if ((ptr = strrchr(buf, '\n')) != NULL) {
#else
#ifdef NO_STRRCHR
if ((ptr = rindex(buf, '\n')) != NULL) {
#else
if ((ptr = strrchr(buf, '\n')) != NULL) {
#endif
ptr++;
if (isdigit((int) *ptr) && *(ptr + 3) == ' ')