]> andersk Git - nss_nonlocal.git/commitdiff
glibc uses regparms for internal functions on i386.
authorAnders Kaseorg <andersk@mit.edu>
Mon, 28 Jul 2008 14:13:25 +0000 (10:13 -0400)
committerAnders Kaseorg <andersk@mit.edu>
Tue, 29 Jul 2008 10:56:21 +0000 (06:56 -0400)
Signed-off-by: Anders Kaseorg <andersk@mit.edu>
configure.ac
nsswitch-internal.h

index 28790a1fb964a67e0e9424b73206d3040290e296..5940f39cd4548e1b24133ce1794f8cfcfeb4d4fc 100644 (file)
@@ -1,4 +1,5 @@
 AC_INIT([nss_nonlocal], [1.7], [andersk@mit.edu])
+AC_CANONICAL_TARGET
 AM_INIT_AUTOMAKE([-Wall -Werror foreign])
 
 AC_PREFIX_DEFAULT([/])
@@ -7,6 +8,13 @@ AC_PROG_CC
 AC_PROG_INSTALL
 AC_PROG_LIBTOOL
 
+case "$target_cpu" in
+    i386 | i486 | i586 | i686 | i786)
+       AC_DEFINE([USE_REGPARMS], [],
+                 [Define if the regparm attribute shall be used for local functions (gcc on ix86 only).])
+       ;;
+esac
+
 AC_CONFIG_HEADERS([config.h])
 AC_CONFIG_FILES([Makefile])
 AC_OUTPUT
index 54c4f3c1a13ce4e8cdb5ea0daa41c12ad0966348..3d064a89206ea272dd29b35d60f7698c17f36f63 100644 (file)
@@ -6,6 +6,15 @@
 #ifndef NSSWITCH_INTERNAL_H
 #define NSSWITCH_INTERNAL_H
 
+#include "config.h"
+
+/* glibc/config.h.in */
+#if defined USE_REGPARMS && !defined PROF && !defined __BOUNDED_POINTERS__
+# define internal_function __attribute__ ((regparm (3), stdcall))
+#else
+# define internal_function
+#endif
+
 /* glibc/nss/nsswitch.h */
 typedef struct service_user service_user;
 
This page took 0.601512 seconds and 5 git commands to generate.