+static void ptr_free(void *ptr)
+{
+ free(*(void **) ptr);
+}
+
+static PHP_GINIT_FUNCTION(psi)
+{
+ char *tmp;
+ struct psi_plist **bl_decls = &psi_globals->blacklist.decls;
+
+ *bl_decls = psi_plist_init(ptr_free);
+
+#define BL_DECL_ADD(d) \
+ tmp = strdup(d); \
+ *bl_decls = psi_plist_add(*bl_decls, &tmp)
+
+ BL_DECL_ADD("dlsym");
+ BL_DECL_ADD("alloca");
+ BL_DECL_ADD("atexit");
+ BL_DECL_ADD("at_quick_exit");
+
+ /* missing */
+ BL_DECL_ADD("_IO_cookie_init");
+ BL_DECL_ADD("bindresvport6");
+
+ /* va_list as arg */
+ BL_DECL_ADD("*v*printf");
+ BL_DECL_ADD("*v*scanf");
+ BL_DECL_ADD("vsyslog");
+
+ /* LFS/LFO for 32bit */
+ BL_DECL_ADD("*stat*64");
+ BL_DECL_ADD("*glob*64");
+ /* Hurd only */
+ BL_DECL_ADD("getumask");
+}
+
+static PHP_GSHUTDOWN_FUNCTION(psi)
+{
+ psi_plist_free(psi_globals->blacklist.decls);
+}
+