+#else
+ /* We can't get function address dynamically in static linking. */
+ {
+# define DEFINE_ENT(h,nm) \
+ extern void _nss_##h##_get##nm##ent_r (void); \
+ extern void _nss_##h##_end##nm##ent (void); \
+ extern void _nss_##h##_set##nm##ent (void);
+# define DEFINE_GET(h,nm) \
+ extern void _nss_##h##_get##nm##_r (void);
+# define DEFINE_GETBY(h,nm,ky) \
+ extern void _nss_##h##_get##nm##by##ky##_r (void);
+# include "function.def"
+# undef DEFINE_ENT
+# undef DEFINE_GET
+# undef DEFINE_GETBY
+# define DEFINE_ENT(h,nm) \
+ { #h"_get"#nm"ent_r", _nss_##h##_get##nm##ent_r }, \
+ { #h"_end"#nm"ent", _nss_##h##_end##nm##ent }, \
+ { #h"_set"#nm"ent", _nss_##h##_set##nm##ent },
+# define DEFINE_GET(h,nm) \
+ { #h"_get"#nm"_r", _nss_##h##_get##nm##_r },
+# define DEFINE_GETBY(h,nm,ky) \
+ { #h"_get"#nm"by"#ky"_r", _nss_##h##_get##nm##by##ky##_r },
+ static struct fct_tbl { const char *fname; void *fp; } *tp, tbl[] =
+ {
+# include "function.def"
+ { NULL, NULL }
+ };
+ size_t namlen = (5 + strlen (ni->library->name) + 1
+ + strlen (fct_name) + 1);
+ char name[namlen];
+
+ /* Construct the function name. */
+ __stpcpy (__stpcpy (__stpcpy (name, ni->library->name),
+ "_"),
+ fct_name);
+
+ result = NULL;
+ for (tp = &tbl[0]; tp->fname; tp++)
+ if (strcmp (tp->fname, name) == 0)
+ {
+ result = tp->fp;
+ break;
+ }
+ }
+#endif