forked from Mirror/frr
lib/printf: rename & private __find_arguments
These are internal to printf(), and symbols starting with __ are reserved for the compiler/libc. Signed-off-by: David Lamparter <equinox@diac24.net>
This commit is contained in:
parent
e8c672ea81
commit
8be3678a23
|
@ -50,6 +50,16 @@ extern "C" {
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if !defined(__GNUC__)
|
||||||
|
#error module code needs GCC visibility extensions
|
||||||
|
#elif __GNUC__ < 4
|
||||||
|
#error module code needs GCC visibility extensions
|
||||||
|
#else
|
||||||
|
# define DSO_PUBLIC __attribute__ ((visibility ("default")))
|
||||||
|
# define DSO_SELF __attribute__ ((visibility ("protected")))
|
||||||
|
# define DSO_LOCAL __attribute__ ((visibility ("hidden")))
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef __sun
|
#ifdef __sun
|
||||||
/* Solaris doesn't do constructor priorities due to linker restrictions */
|
/* Solaris doesn't do constructor priorities due to linker restrictions */
|
||||||
#undef _CONSTRUCTOR
|
#undef _CONSTRUCTOR
|
||||||
|
|
10
lib/module.h
10
lib/module.h
|
@ -24,16 +24,6 @@
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if !defined(__GNUC__)
|
|
||||||
#error module code needs GCC visibility extensions
|
|
||||||
#elif __GNUC__ < 4
|
|
||||||
#error module code needs GCC visibility extensions
|
|
||||||
#else
|
|
||||||
# define DSO_PUBLIC __attribute__ ((visibility ("default")))
|
|
||||||
# define DSO_SELF __attribute__ ((visibility ("protected")))
|
|
||||||
# define DSO_LOCAL __attribute__ ((visibility ("hidden")))
|
|
||||||
#endif
|
|
||||||
|
|
||||||
struct frrmod_runtime;
|
struct frrmod_runtime;
|
||||||
|
|
||||||
struct frrmod_info {
|
struct frrmod_info {
|
||||||
|
|
|
@ -250,7 +250,7 @@ addwaster(struct typetable *types, wchar_t **fmtp)
|
||||||
* Returns 0 on success. On failure, returns nonzero and sets errno.
|
* Returns 0 on success. On failure, returns nonzero and sets errno.
|
||||||
*/
|
*/
|
||||||
int
|
int
|
||||||
__find_arguments (const char *fmt0, va_list ap, union arg **argtable)
|
_frr_find_arguments (const char *fmt0, va_list ap, union arg **argtable)
|
||||||
{
|
{
|
||||||
char *fmt; /* format string */
|
char *fmt; /* format string */
|
||||||
int ch; /* character from fmt */
|
int ch; /* character from fmt */
|
||||||
|
@ -442,7 +442,7 @@ error:
|
||||||
#ifdef WCHAR_SUPPORT
|
#ifdef WCHAR_SUPPORT
|
||||||
/* wchar version of __find_arguments. */
|
/* wchar version of __find_arguments. */
|
||||||
int
|
int
|
||||||
__find_warguments (const wchar_t *fmt0, va_list ap, union arg **argtable)
|
_frr_find_warguments (const wchar_t *fmt0, va_list ap, union arg **argtable)
|
||||||
{
|
{
|
||||||
wchar_t *fmt; /* format string */
|
wchar_t *fmt; /* format string */
|
||||||
wchar_t ch; /* character from fmt */
|
wchar_t ch; /* character from fmt */
|
||||||
|
|
|
@ -34,6 +34,8 @@
|
||||||
* $FreeBSD$
|
* $FreeBSD$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include "compiler.h"
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Flags used during conversion.
|
* Flags used during conversion.
|
||||||
*/
|
*/
|
||||||
|
@ -92,7 +94,7 @@ union arg {
|
||||||
};
|
};
|
||||||
|
|
||||||
/* Handle positional parameters. */
|
/* Handle positional parameters. */
|
||||||
int __find_arguments(const char *, va_list, union arg **);
|
int _frr_find_arguments(const char *, va_list, union arg **) DSO_LOCAL;
|
||||||
#ifdef WCHAR_SUPPORT
|
#ifdef WCHAR_SUPPORT
|
||||||
int __find_warguments(const wchar_t *, va_list, union arg **);
|
int _frr_find_warguments(const wchar_t *, va_list, union arg **) DSO_LOCAL;
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -253,7 +253,7 @@ __vfprintf(FILE *fp, const char *fmt0, va_list ap)
|
||||||
int hold = nextarg; \
|
int hold = nextarg; \
|
||||||
if (argtable == NULL) { \
|
if (argtable == NULL) { \
|
||||||
argtable = statargtable; \
|
argtable = statargtable; \
|
||||||
if (__find_arguments (fmt0, orgap, &argtable)) { \
|
if (_frr_find_arguments (fmt0, orgap, &argtable)) { \
|
||||||
ret = EOF; \
|
ret = EOF; \
|
||||||
goto error; \
|
goto error; \
|
||||||
} \
|
} \
|
||||||
|
@ -369,7 +369,7 @@ reswitch: switch (ch) {
|
||||||
nextarg = n;
|
nextarg = n;
|
||||||
if (argtable == NULL) {
|
if (argtable == NULL) {
|
||||||
argtable = statargtable;
|
argtable = statargtable;
|
||||||
if (__find_arguments (fmt0, orgap,
|
if (_frr_find_arguments (fmt0, orgap,
|
||||||
&argtable)) {
|
&argtable)) {
|
||||||
ret = EOF;
|
ret = EOF;
|
||||||
goto error;
|
goto error;
|
||||||
|
|
Loading…
Reference in a new issue