summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorgeniusdex geniusdex@31f1291d-b8d6-0310-a050-a5561fc1590b <geniusdex geniusdex@31f1291d-b8d6-0310-a050-a5561fc1590b@5417fbe8-f217-4b02-8779-1006273d7864>2006-06-11 17:04:12 +0000
committergeniusdex geniusdex@31f1291d-b8d6-0310-a050-a5561fc1590b <geniusdex geniusdex@31f1291d-b8d6-0310-a050-a5561fc1590b@5417fbe8-f217-4b02-8779-1006273d7864>2006-06-11 17:04:12 +0000
commitf1d0119044a2698c24243be1f46a06c556aaa456 (patch)
tree2344d9b5f204112bb27b27c785bec0ac9205206e /include
parent7a97a4e6591da5bfeefcb396b1870186b2e4acce (diff)
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
Diffstat (limited to 'include')
-rw-r--r--include/modules.h7
1 files changed, 6 insertions, 1 deletions
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