mirror of
				https://gitlab.freedesktop.org/libbsd/libbsd.git
				synced 2025-10-28 11:31:57 +01:00 
			
		
		
		
	build: Abstract symbol versioning via new libbsd_symver_* macros
This makes it more obvious what they are doing. It will make it easier to make these directives more portable, as they are really ELF specific.
This commit is contained in:
		| @@ -31,6 +31,7 @@ | ||||
| #include <err.h> | ||||
| #include <unistd.h> | ||||
| #include <string.h> | ||||
| #include "local-link.h" | ||||
|  | ||||
| static struct { | ||||
| 	/* Original value. */ | ||||
| @@ -280,7 +281,7 @@ setproctitle_impl(const char *fmt, ...) | ||||
| 		*++nul = '\0'; | ||||
| 	} | ||||
| } | ||||
| __asm__(".symver setproctitle_impl,setproctitle@@LIBBSD_0.5"); | ||||
| libbsd_symver_default(setproctitle, setproctitle_impl, LIBBSD_0.5); | ||||
|  | ||||
| /* The original function introduced in 0.2 was a stub, it only got implemented | ||||
|  * in 0.5, make the implementation available in the old version as an alias | ||||
| @@ -295,4 +296,4 @@ void | ||||
| setproctitle_stub(const char *fmt, ...) | ||||
| 	__attribute__((__alias__("setproctitle_impl"))); | ||||
| #endif | ||||
| __asm__(".symver setproctitle_stub,setproctitle@LIBBSD_0.2"); | ||||
| libbsd_symver_variant(setproctitle, setproctitle_stub, LIBBSD_0.2); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Guillem Jover
					Guillem Jover