mirror of
https://gitlab.freedesktop.org/libbsd/libbsd.git
synced 2025-10-15 15:16:53 +02:00
Support GCC deprecated attribute for GCC older than 4.5
Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=99190 Based-on-patch-by: Eric Smith <brouhaha@fedoraproject.org>
This commit is contained in:
@@ -38,7 +38,11 @@
|
||||
#ifndef LIBBSD_STDIO_H
|
||||
#define LIBBSD_STDIO_H
|
||||
|
||||
#ifdef LIBBSD_OVERLAY
|
||||
#include <sys/cdefs.h>
|
||||
#else
|
||||
#include <bsd/sys/cdefs.h>
|
||||
#endif
|
||||
#include <sys/types.h>
|
||||
|
||||
__BEGIN_DECLS
|
||||
@@ -47,9 +51,9 @@ const char *fmtcheck(const char *, const char *);
|
||||
/* XXX: The function requires cooperation from the system libc to store the
|
||||
* line buffer in the FILE struct itself. */
|
||||
char *fgetln(FILE *fp, size_t *lenp)
|
||||
__attribute__((deprecated("This functions cannot be safely ported, "
|
||||
"use getline(3) instead, as it is supported "
|
||||
"by GNU and POSIX.1-2008.")));
|
||||
LIBBSD_DEPRECATED("This functions cannot be safely ported, "
|
||||
"use getline(3) instead, as it is supported "
|
||||
"by GNU and POSIX.1-2008.");
|
||||
|
||||
/*
|
||||
* Note: We diverge from the FreeBSD, OpenBSD and DragonFlyBSD declarations,
|
||||
|
Reference in New Issue
Block a user