From f1d0119044a2698c24243be1f46a06c556aaa456 Mon Sep 17 00:00:00 2001 From: "geniusdex geniusdex@31f1291d-b8d6-0310-a050-a5561fc1590b" Date: Sun, 11 Jun 2006 17:04:12 +0000 Subject: BUILD : 1.7.14 (1045) BUGS : NOTES : Fixed ano_modclearerr() - it was not POSIX-compliant git-svn-id: svn://svn.anope.org/anope/trunk@1045 31f1291d-b8d6-0310-a050-a5561fc1590b git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@769 5417fbe8-f217-4b02-8779-1006273d7864 --- include/modules.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/modules.h b/include/modules.h index 9079d80a9..91910ea40 100644 --- a/include/modules.h +++ b/include/modules.h @@ -40,7 +40,12 @@ typedef void * ano_module_t; #define ano_moderr() dlerror() #define ano_modsym(file, symbol) dlsym(file, DL_PREFIX symbol) #define ano_modclose(file) dlclose(file) -#define ano_modclearerr() errno = 0 +/* We call dlerror() here because it clears the module error after being + * called. This previously read 'errno = 0', but that didn't work on + * all POSIX-compliant architectures. This way the error is guaranteed + * to be cleared, POSIX-wise. -GD + */ +#define ano_modclearerr() dlerror() #define MODULE_EXT ".so" #endif -- cgit