summaryrefslogtreecommitdiffstats
path: root/libc/inet/getnetent.c
diff options
context:
space:
mode:
author"Steven J. Hill" <sjhill@realitydiluted.com>2006-02-25 04:03:33 +0000
committer"Steven J. Hill" <sjhill@realitydiluted.com>2006-02-25 04:03:33 +0000
commitcb6a88484ce0b5ffba2fe98a40e2d51f4af92eb8 (patch)
tree520f8e8d113184cfa7954ebd274564b8c255fa9a /libc/inet/getnetent.c
parente4461be66e2655058aef358b00050bc70ac72861 (diff)
downloaduClibc-alpine-cb6a88484ce0b5ffba2fe98a40e2d51f4af92eb8.tar.bz2
uClibc-alpine-cb6a88484ce0b5ffba2fe98a40e2d51f4af92eb8.tar.xz
Merge from trunk. Going pretty good so far. Kind of. Okay, not really.
Diffstat (limited to 'libc/inet/getnetent.c')
-rw-r--r--libc/inet/getnetent.c27
1 files changed, 16 insertions, 11 deletions
diff --git a/libc/inet/getnetent.c b/libc/inet/getnetent.c
index cd5f63ad5..d3fdb988a 100644
--- a/libc/inet/getnetent.c
+++ b/libc/inet/getnetent.c
@@ -15,10 +15,6 @@
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*/
-#define inet_network __inet_network
-#define rewind __rewind
-#define fgets __fgets
-
#define __FORCE_GLIBC
#include <features.h>
#include <stdio.h>
@@ -26,6 +22,12 @@
#include <netdb.h>
#include <arpa/inet.h>
+libc_hidden_proto(fopen)
+libc_hidden_proto(fclose)
+libc_hidden_proto(inet_network)
+libc_hidden_proto(rewind)
+libc_hidden_proto(fgets)
+libc_hidden_proto(abort)
#ifdef __UCLIBC_HAS_THREADS__
# include <pthread.h>
@@ -43,9 +45,10 @@ static char *line = NULL;
static struct netent net;
static char *net_aliases[MAXALIASES];
-int _net_stayopen;
+int _net_stayopen attribute_hidden;
-void attribute_hidden __setnetent(int f)
+libc_hidden_proto(setnetent)
+void setnetent(int f)
{
LOCK;
if (netf == NULL)
@@ -56,9 +59,10 @@ void attribute_hidden __setnetent(int f)
UNLOCK;
return;
}
-strong_alias(__setnetent,setnetent)
+libc_hidden_def(setnetent)
-void attribute_hidden __endnetent(void)
+libc_hidden_proto(endnetent)
+void endnetent(void)
{
LOCK;
if (netf) {
@@ -68,7 +72,7 @@ void attribute_hidden __endnetent(void)
_net_stayopen = 0;
UNLOCK;
}
-strong_alias(__endnetent,endnetent)
+libc_hidden_def(endnetent)
static char * any(register char *cp, char *match)
{
@@ -83,7 +87,8 @@ static char * any(register char *cp, char *match)
return ((char *)0);
}
-struct netent attribute_hidden * __getnetent(void)
+libc_hidden_proto(getnetent)
+struct netent *getnetent(void)
{
char *p;
register char *cp, **q;
@@ -142,4 +147,4 @@ again:
UNLOCK;
return (&net);
}
-strong_alias(__getnetent,getnetent)
+libc_hidden_def(getnetent)