Skip to content

Commit a3edabd

Browse files
committed
Fix fgetln(3) for consistency
1 parent 75930fe commit a3edabd

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

examples/cbf_standardize_numbers.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,11 @@
1515
#include <string.h>
1616

1717

18-
char * fgetln(FILE *, size_t *);
18+
#ifndef HAVE_FGETLN
19+
# define fgetln _cbf_fgetln
20+
char *
21+
_cbf_fgetln(FILE *stream, size_t *len);
22+
#endif
1923

2024
void usage ( void ) {
2125

src/fgetln.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,8 @@
3131
#include <stdlib.h>
3232
#include <string.h>
3333

34-
#ifndef HAVE_fgetln
3534
char *
36-
fgetln(FILE *stream, size_t *len)
35+
_cbf_fgetln(FILE *stream, size_t *len)
3736
{
3837
static char *buf = NULL;
3938
static size_t buflen = 0;
@@ -63,4 +62,3 @@ fgetln(FILE *stream, size_t *len)
6362
*len = strlen(buf);
6463
return buf;
6564
}
66-
#endif /* !defined(HAVE_fgetln) */

0 commit comments

Comments
 (0)