<html><head></head><body><div class="gmail_quote">&quot;Peter S. Mazinger&quot; &lt;ps.m@gmx.net&gt; wrote:<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div style="white-space: pre-wrap; word-wrap:break-word; ">
commit: <a href="http://git.uclibc.org/uClibc/commit/?id=2d1c02a9baa2a25315e5b5473f903fcae100e383">http://git.uclibc.org/uClibc/commit/?id=2d1c02a9baa2a25315e5b5473f903fcae100e383</a> branch: <a href="http://git.uclibc.org/uClibc/commit/?id=refs/heads/future">http://git.uclibc.org/uClibc/commit/?id=refs/heads/future</a>

__X() {...} and strong_alias(__X,X) keeps size the same as X() {...}

Signed-off-by: Peter S. Mazinger &lt;ps.m@gmx.net&gt;
---
 libc/misc/utmp/utent.c |   37 +++++++++++++++++--------------------
 1 files changed, 17 insertions(+), 20 deletions(-)
 diff --git a/libc/misc/utmp/utent.c b/libc/misc/utmp/utent.c index f97cad3..07ca44e 100644
--- a/libc/misc/utmp/utent.c
+++ b/libc/misc/utmp/utent.c
@@ -24,27 +24,14 @@
 #include &lt;bits/uClibc_mutex.h&gt;
 __UCLIBC_MUTEX_STATIC(utmplock, PTHREAD_MUTEX_INITIALIZER);
 
-
-/* Do not create extra unlocked functions if no locking is needed */
-#if defined __UCLIBC_HAS_THREADS__
-# define static_if_threaded static
-#else
-# define static_if_threaded /* nothing */
-# define __setutent setutent
-# define __getutent getutent
-# define __getutid getutid
-#endif
-
-
 /* Some global crap */
 static int static_fd = -1;
 static struct utmp static_utmp;
 static const char default_file_name[] = _PATH_UTMP;
 static const char *static_ut_name = default_file_name;
 
-
 /* This function must be called with the LOCK held */
-static_if_threaded void __setutent(void)
+static void __setutent(void)
 {
     if (static_fd &lt; 0) {
         static_fd = open_not_cancel_2(static_ut_name, O_RDWR | O_CLOEXEC);
@@ -69,11 +56,13 @@ void setutent(void)
     __setutent();
     __UCLIBC_MUTEX_UNLOCK(utmplock);
 }
+#else
+strong_alias(__setutent,setutent)
 #endif
 libc_hidden_def(setutent)
 
 /* This function must be called with the LOCK held */
-static_if_threaded struct utmp *__getutent(void)
+static struct utmp *__getutent(void)
 {
     if (static_fd &lt; 0) {
         __setutent();
@@ -98,10 +87,12 @@ struct utmp *getutent(void)
     __UCLIBC_MUTEX_UNLOCK(utmplock);
     return ret;
 }
+#else
+strong_alias(__getutent,getutent)
 #endif
 libc_hidden_def(getutent)
 
-void endutent(void)
+static void __endutent(void)
 {
     __UCLIBC_MUTEX_LOCK(utmplock);
     if (static_fd &gt;= 0)
@@ -109,10 +100,11 @@ void endutent(void)
     static_fd = -1;
     __UCLIBC_MUTEX_UNLOCK(utmplock);
 }
+strong_alias(__endutent,endutent)
 libc_hidden_def(endutent)
 
 /* This function must be called with the LOCK held */
-static_if_threaded struct utmp *__getutid(const struct utmp *utmp_entry)
+static struct utmp *__getutid(const struct utmp *utmp_entry)
 {
     struct utmp *lutmp;
     unsigned type;
@@ -145,10 +137,12 @@ struct utmp *getutid(const struct utmp *utmp_entry)
     __UCLIBC_MUTEX_UNLOCK(utmplock);
     return ret;
 }
+#else
+strong_alias(__getutid,getutid)
 #endif
 libc_hidden_def(getutid)
 
-struct utmp *getutline(const struct utmp *utmp_entry)
+static struct utmp *__getutline(const struct utmp *utmp_entry)
 {
     struct utmp *lutmp;
 
@@ -163,9 +157,10 @@ struct utmp *getutline(const struct utmp *utmp_entry)
     __UCLIBC_MUTEX_UNLOCK(utmplock);
     return lutmp;
 }
+strong_alias(__getutline,getutline)
 libc_hidden_def(getutline)
 
-struct utmp *pututline(const struct utmp *utmp_entry)
+static struct utmp *__pututline(const struct utmp *utmp_entry)
 {
     __UCLIBC_MUTEX_LOCK(utmplock);
     /* Ignore the return value.  That way, if they've already positioned
@@ -182,9 +177,10 @@ struct utmp *pututline(const struct utmp *utmp_entry)
     __UCLIBC_MUTEX_UNLOCK(utmplock);
     return (struct utmp *)utmp_entry;
 }
+strong_alias(__pututline,pututline)
 libc_hidden_def(pututline)
 
-int utmpname(const char *new_ut_name)
+static int __utmpname(const char *new_ut_name)
 {
     __UCLIBC_MUTEX_LOCK(utmplock);
     if (new_ut_name != NULL) {
@@ -205,4 +201,5 @@ int utmpname(const char *new_ut_name)
     __UCLIBC_MUTEX_UNLOCK(utmplock);
     return 0; /* or maybe return -(static_ut_name != new_ut_name)? */
 }
+strong_alias(__utmpname,utmpname)
 libc_hidden_def(utmpname)
-- 
<a href="http://1.7.3.4">1.7.3.4</a><hr />uClibc-cvs mailing list
uClibc-cvs@uclibc.org
<a href="http://lists.busybox.net/mailman/listinfo/uclibc-cvs">http://lists.busybox.net/mailman/listinfo/uclibc-cvs</a>
</div></blockquote></div><br clear="all">Hi,<br>
<br>
Let&#39;s please use a &quot;__libc_&quot; prefix instead of just double underscore (everywhere).</body></html>