LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File crypt_blowfish-1.2-versioning.diff of Package glibc.i686 (Project Base:build)

Index: crypt_blowfish-1.2/wrapper.c
===================================================================
--- crypt_blowfish-1.2/wrapper.c
+++ crypt_blowfish-1.2/wrapper.c
@@ -38,6 +38,7 @@
 #define CRYPT_GENSALT_OUTPUT_SIZE	(7 + 22 + 1)
 
 #if defined(__GLIBC__) && defined(_LIBC)
+#include <shlib-compat.h>
 #define __SKIP_GNU
 #endif
 #include "ow-crypt.h"
@@ -291,14 +292,34 @@ char *__crypt_gensalt(const char *prefix
 }
 
 #if defined(__GLIBC__) && defined(_LIBC)
-weak_alias(__crypt_rn, crypt_rn)
-weak_alias(__crypt_ra, crypt_ra)
 weak_alias(__crypt_r, crypt_r)
 weak_alias(__crypt, crypt)
-weak_alias(__crypt_gensalt_rn, crypt_gensalt_rn)
-weak_alias(__crypt_gensalt_ra, crypt_gensalt_ra)
-weak_alias(__crypt_gensalt, crypt_gensalt)
-weak_alias(crypt, fcrypt)
+weak_alias(__crypt, fcrypt)
+#if SHARED
+#if 1 // Owl has crypt_gensalt as GLIBC_2_0 so keep for compatibility
+#define ow_compat_symbol(name) \
+	compat_symbol(libcrypt, _compat_##name, name, GLIBC_2_0); \
+	weak_alias(__##name, _compat_##name)
+#else
+#define ow_compat_symbol(name)
+#endif
+
+#define ow_versioned(name) \
+	ow_compat_symbol(name) \
+	versioned_symbol(libcrypt, _owl_##name, name, OW_CRYPT_1_0);
+#else
+#define ow_versioned(name)
+#endif // SHARED
+
+#define ow_symbol(name) \
+	ow_versioned(name) \
+	weak_alias(__##name, _owl_##name) \
+
+ow_symbol(crypt_rn)
+ow_symbol(crypt_ra)
+ow_symbol(crypt_gensalt)
+ow_symbol(crypt_gensalt_rn)
+ow_symbol(crypt_gensalt_ra)
 #endif
 
 #ifdef TEST