This is the mail archive of the
libc-hacker@cygnus.com
mailing list for the glibc project.
Extern inline in <gmp.h>
- To: libc-hacker@cygnus.com
- Subject: Extern inline in <gmp.h>
- From: Andreas Jaeger <aj@arthur.rhein-neckar.de>
- Date: 23 Mar 1999 19:44:56 +0100
We define in stdlib/gmp.h the functions (note that there's a define
adding the leading underscores) __mpn_add_1, __mpn_add, __mpn_sub_1,
__mpn_sub as extern inline and define these functions in
sysdeps/generic/inlines.c if inlining fails but don't export these
functions. You'll notice this problem e.g. when compiling glibc
without inlining functions during make check:
/usr/glibc/src/buildreport/19990323/stdlib/mul_n.o: In function `__mpn_impn_mul_n':
/usr/glibc/src/buildreport/19990323/stdlib/mul_n.o(.text+0x6fa): undefined reference to `__mpn_add_1'
/usr/glibc/src/buildreport/19990323/stdlib/mul_n.o(.text+0x7c8): undefined reference to `__mpn_add_1'
/usr/glibc/src/buildreport/19990323/stdlib/mul_n.o: In function `__mpn_impn_sqr_n':
/usr/glibc/src/buildreport/19990323/stdlib/mul_n.o(.text+0xd8a): undefined reference to `__mpn_add_1'
/usr/glibc/src/buildreport/19990323/stdlib/mul_n.o(.text+0xe58): undefined reference to `__mpn_add_1'
Since <gmp.h> makes these four functions visible, they should be
exported. I propose the appended patch.
Andreas
1999-03-23 Andreas Jaeger <aj@arthur.rhein-neckar.de>
* stdlib/Versions: Add __mpn_add, __mpn_add_1, __mpn_sub,
__mpn_sub_1 since they're defined as extern inline in <gmp.h>.
--- stdlib/Versions.~1~ Sun Feb 7 23:33:28 1999
+++ stdlib/Versions Tue Mar 23 18:22:21 1999
@@ -13,6 +13,9 @@
# functions used in other libraries
__secure_getenv; __on_exit;
+ # functions defined as extern inline
+ __mpn_add; __mpn_add_1; __mpn_sub; __mpn_sub_1;
+
# a*
a64l; abort; abs; atexit; atof; atoi; atol; atoll;
--
Andreas Jaeger aj@arthur.rhein-neckar.de jaeger@informatik.uni-kl.de
for pgp-key finger ajaeger@aixd1.rhrk.uni-kl.de