about summary refs log tree commit diff
path: root/login
diff options
context:
space:
mode:
Diffstat (limited to 'login')
-rw-r--r--login/endutent.c2
-rw-r--r--login/endutent_r.c3
-rw-r--r--login/getutent.c2
-rw-r--r--login/getutent_r.c3
-rw-r--r--login/getutid.c2
-rw-r--r--login/getutid_r.c5
-rw-r--r--login/getutline.c2
-rw-r--r--login/getutline_r.c7
-rw-r--r--login/pututline.c2
-rw-r--r--login/pututline_r.c3
-rw-r--r--login/setutent.c2
-rw-r--r--login/setutent_r.c8
-rw-r--r--login/utmp.h11
13 files changed, 35 insertions, 17 deletions
diff --git a/login/endutent.c b/login/endutent.c
index 9aed00d7a7..3df95bef93 100644
--- a/login/endutent.c
+++ b/login/endutent.c
@@ -27,5 +27,5 @@ extern struct utmp_data __utmp_data;
 void
 endutent (void)
 {
-  endutent_r (&__utmp_data);
+  __endutent_r (&__utmp_data);
 }
diff --git a/login/endutent_r.c b/login/endutent_r.c
index b15f57a964..a531054a2a 100644
--- a/login/endutent_r.c
+++ b/login/endutent_r.c
@@ -22,7 +22,7 @@ Boston, MA 02111-1307, USA.  */
 
 
 void
-endutent_r (struct utmp_data *utmp_data)
+__endutent_r (struct utmp_data *utmp_data)
 {
   if (utmp_data->ut_fd != -1)
     {
@@ -30,3 +30,4 @@ endutent_r (struct utmp_data *utmp_data)
       utmp_data->ut_fd = -1;
     }
 }
+weak_alias (__endutent_r, endutent_r)
diff --git a/login/getutent.c b/login/getutent.c
index 36411469a0..03b49dbf7e 100644
--- a/login/getutent.c
+++ b/login/getutent.c
@@ -29,7 +29,7 @@ getutent (void)
 {
   struct utmp *result;
 
-  if (getutent_r (&result, &__utmp_data) < 0)
+  if (__getutent_r (&result, &__utmp_data) < 0)
     return NULL;
 
   return result;
diff --git a/login/getutent_r.c b/login/getutent_r.c
index ad8e9eb7c2..e3550017f9 100644
--- a/login/getutent_r.c
+++ b/login/getutent_r.c
@@ -22,7 +22,7 @@ Boston, MA 02111-1307, USA.  */
 
 
 int
-getutent_r (struct utmp **utmp, struct utmp_data *utmp_data)
+__getutent_r (struct utmp **utmp, struct utmp_data *utmp_data)
 {
   /* Open utmp file if not already done.  */
   if (utmp_data->ut_fd == -1)
@@ -48,3 +48,4 @@ getutent_r (struct utmp **utmp, struct utmp_data *utmp_data)
 
   return 0;
 }
+weak_alias (__getutent_r, getutent_r)
diff --git a/login/getutid.c b/login/getutid.c
index 6b29d38fd0..64ced6aeea 100644
--- a/login/getutid.c
+++ b/login/getutid.c
@@ -29,7 +29,7 @@ getutid (const struct utmp *id)
 {
   struct utmp *result;
 
-  if (getutid_r (id, &result, &__utmp_data) < 0)
+  if (__getutid_r (id, &result, &__utmp_data) < 0)
     return NULL;
 
   return (struct utmp *) result;
diff --git a/login/getutid_r.c b/login/getutid_r.c
index 73bcb3d9c0..00dbec40c8 100644
--- a/login/getutid_r.c
+++ b/login/getutid_r.c
@@ -26,8 +26,8 @@ Boston, MA 02111-1307, USA.  */
 /* For implementing this function we don't use the getutent_r function
    because we can avoid the reposition on every new entry this way.  */
 int
-getutid_r (const struct utmp *id, struct utmp **utmp,
-	   struct utmp_data *utmp_data)
+__getutid_r (const struct utmp *id, struct utmp **utmp,
+	     struct utmp_data *utmp_data)
 {
 #if (_HAVE_UT_ID - 0) && (_HAVE_UT_TYPE - 0)
   /* Test whether ID has any of the legal types.  */
@@ -114,3 +114,4 @@ getutid_r (const struct utmp *id, struct utmp **utmp,
   return -1;
 #endif
 }
+weak_alias (__getutid_r, getutid_r)
diff --git a/login/getutline.c b/login/getutline.c
index 23ca6a8107..c21f81745b 100644
--- a/login/getutline.c
+++ b/login/getutline.c
@@ -29,7 +29,7 @@ getutline (const struct utmp *line)
 {
   struct utmp *result;
 
-  if (getutline_r (line, &result, &__utmp_data) < 0)
+  if (__getutline_r (line, &result, &__utmp_data) < 0)
     return NULL;
 
   return (struct utmp *) result;
diff --git a/login/getutline_r.c b/login/getutline_r.c
index 4d3547181f..e5c41966c6 100644
--- a/login/getutline_r.c
+++ b/login/getutline_r.c
@@ -26,13 +26,13 @@ Boston, MA 02111-1307, USA.  */
 /* For implementing this function we don't use the getutent_r function
    because we can avoid the reposition on every new entry this way.  */
 int
-getutline_r (const struct utmp *line, struct utmp **utmp,
-	     struct utmp_data *utmp_data)
+__getutline_r (const struct utmp *line, struct utmp **utmp,
+	       struct utmp_data *utmp_data)
 {
   /* Open utmp file if not already done.  */
   if (utmp_data->ut_fd == -1)
     {
-      setutent_r (utmp_data);
+      __setutent_r (utmp_data);
       if (utmp_data->ut_fd == -1)
 	return -1;
     }
@@ -71,3 +71,4 @@ getutline_r (const struct utmp *line, struct utmp **utmp,
 
   return 0;
 }
+weak_alias (__getutline_r, getutline_r)
diff --git a/login/pututline.c b/login/pututline.c
index a704e380fa..7af3efbb46 100644
--- a/login/pututline.c
+++ b/login/pututline.c
@@ -27,7 +27,7 @@ extern struct utmp_data __utmp_data;
 struct utmp *
 pututline (const struct utmp *utmp)
 {
-  if (pututline_r (utmp, &__utmp_data) < 0)
+  if (__pututline_r (utmp, &__utmp_data) < 0)
     return NULL;
 
   return (struct utmp *) utmp;
diff --git a/login/pututline_r.c b/login/pututline_r.c
index ada6059aae..0b819000d1 100644
--- a/login/pututline_r.c
+++ b/login/pututline_r.c
@@ -31,7 +31,7 @@ Boston, MA 02111-1307, USA.  */
    which write the new value.  */
 
 int
-pututline_r (const struct utmp *id, struct utmp_data *utmp_data)
+__pututline_r (const struct utmp *id, struct utmp_data *utmp_data)
 {
   struct stat st;
   int result = 0;
@@ -136,3 +136,4 @@ pututline_r (const struct utmp *id, struct utmp_data *utmp_data)
 
   return result;
 }
+weak_alias (__pututline_r, pututline_r)
diff --git a/login/setutent.c b/login/setutent.c
index aab28c0015..32d2f8c1f7 100644
--- a/login/setutent.c
+++ b/login/setutent.c
@@ -27,5 +27,5 @@ struct utmp_data __utmp_data = { ut_fd: -1 };
 void
 setutent (void)
 {
-  setutent_r (&__utmp_data);
+  __setutent_r (&__utmp_data);
 }
diff --git a/login/setutent_r.c b/login/setutent_r.c
index 4b980cf1a7..46700e700f 100644
--- a/login/setutent_r.c
+++ b/login/setutent_r.c
@@ -31,7 +31,7 @@ static const char *utmp_file_name = (const char *) default_utmp_name;
 
 
 void
-setutent_r (struct utmp_data *utmp_data)
+__setutent_r (struct utmp_data *utmp_data)
 {
   /* Before the UTMP_DATA is used before the first time the UT_FD
      field must be set to -1.  */
@@ -56,12 +56,13 @@ setutent_r (struct utmp_data *utmp_data)
   utmp_data->ubuf.ut_type = UT_UNKNOWN;
 #endif
 }
+weak_alias (__setutent_r, setutent_r)
 
 
 int
-utmpname (const char *file)
+__utmpname (const char *file)
 {
-  char *fname = strdup (file);
+  char *fname = __strdup (file);
   if (fname == NULL)
     return 0;
 
@@ -72,3 +73,4 @@ utmpname (const char *file)
 
   return 1;
 }
+weak_alias (__utmpname, utmpname)
diff --git a/login/utmp.h b/login/utmp.h
index 0109d50994..76870f68ef 100644
--- a/login/utmp.h
+++ b/login/utmp.h
@@ -86,19 +86,30 @@ struct utmp_data
 
 
 /* Reentrant versions of the file for handling utmp files.  */
+extern int __getutent_r __P ((struct utmp **__utmp,
+			      struct utmp_data *__utmp_data));
 extern int getutent_r __P ((struct utmp **__utmp,
 			    struct utmp_data *__utmp_data));
 
+extern void __setutent_r __P ((struct utmp_data *__utmp_data));
 extern void setutent_r __P ((struct utmp_data *__utmp_data));
 
+extern void __endutent_r __P ((struct utmp_data *__utmp_data));
 extern void endutent_r __P ((struct utmp_data *__utmp_data));
 
+extern int __getutid_r __P ((__const struct utmp *__id, struct utmp **__utmp,
+			     struct utmp_data *__utmp_data));
 extern int getutid_r __P ((__const struct utmp *__id, struct utmp **__utmp,
 			   struct utmp_data *__utmp_data));
 
+extern int __getutline_r __P ((__const struct utmp *__line,
+			       struct utmp **__utmp,
+			       struct utmp_data *__utmp_data));
 extern int getutline_r __P ((__const struct utmp *__line, struct utmp **__utmp,
 			     struct utmp_data *__utmp_data));
 
+extern int __pututline_r __P ((__const struct utmp *__utmp_ptr,
+			       struct utmp_data *__utmp_data));
 extern int pututline_r __P ((__const struct utmp *__utmp_ptr,
 			     struct utmp_data *__utmp_data));