From: Niki Roo Date: Sun, 23 Jun 2024 12:19:00 +0000 (+0200) Subject: getline: do not overwrite per default X-Git-Url: http://git.nikiroo.be/?a=commitdiff_plain;h=8a3dcb4e6495ca5a0fd8846a4e4dc6ed52e90136;p=cutils.git getline: do not overwrite per default --- diff --git a/cutils.h b/cutils.h index 8fcaadd..b86cb53 100644 --- a/cutils.h +++ b/cutils.h @@ -71,16 +71,17 @@ size_t strnlen(const char *s, size_t maxlen); */ char *strdup(const char *source); #endif -//#if _POSIX_C_SOURCE < 200809L -//#ifndef _GNU_SOURCE +#if _POSIX_C_SOURCE < 200809L +#ifndef _GNU_SOURCE +#include /** * getline() reads an entire line from stream, storing the address of the * buffer containing the text into *lineptr. The buffer is null- * terminated and includes the newline character, if one was found. */ ssize_t getline(char **strp, size_t *n, FILE *f); -//#endif -//#endif +#endif +#endif /* */