]> git.seodisparate.com - UDPConnection/commitdiff
Fix const error strings
authorStephen Seo <seo.disparate@gmail.com>
Wed, 6 Mar 2019 12:50:13 +0000 (21:50 +0900)
committerStephen Seo <seo.disparate@gmail.com>
Wed, 6 Mar 2019 12:50:13 +0000 (21:50 +0900)
src/UDPC_Defines.h
src/UDPConnection.c

index 650f14a7e719677ea675f3de1799cf21a51cff78..f742f9c1457b0a864cce369b81df0c79809395e4 100644 (file)
 #define UDPC_ERR_CVFAIL 5 // failed to create condition variable
 #define UDPC_ERR_THREADFAIL 6 // failed to create thread
 
-static const char *UDPC_ERR_SOCKETFAIL_STR = "Failed to create socket";
-static const char *UDPC_ERR_SOCKETBINDF_STR = "Failed to bind socket";
-static const char *UDPC_ERR_SOCKETNONBF_STR = "Failed to set non-blocking on socket";
-static const char *UDPC_ERR_MTXFAIL_STR = "Failed to create mutex";
-static const char *UDPC_ERR_CVFAIL_STR = "Failed to create condition variable";
-static const char *UDPC_ERR_THREADFAIL_STR = "Failed to create thread";
+extern const char *UDPC_ERR_SOCKETFAIL_STR;
+extern const char *UDPC_ERR_SOCKETBINDF_STR;
+extern const char *UDPC_ERR_SOCKETNONBF_STR;
+extern const char *UDPC_ERR_MTXFAIL_STR;
+extern const char *UDPC_ERR_CVFAIL_STR;
+extern const char *UDPC_ERR_THREADFAIL_STR;
 
 #define UDPC_CD_AMOUNT 32
 
index d1bbc6b0aa8c3c2bb5e002028b9a88303e3b0104..ba276e01afc9cb4aef8a5c1c034d62f85676ae30 100644 (file)
@@ -1,5 +1,13 @@
+#include "UDPC_Defines.h"
 #include "UDPConnection.h"
 
+const char *UDPC_ERR_SOCKETFAIL_STR = "Failed to create socket";
+const char *UDPC_ERR_SOCKETBINDF_STR = "Failed to bind socket";
+const char *UDPC_ERR_SOCKETNONBF_STR = "Failed to set non-blocking on socket";
+const char *UDPC_ERR_MTXFAIL_STR = "Failed to create mutex";
+const char *UDPC_ERR_CVFAIL_STR = "Failed to create condition variable";
+const char *UDPC_ERR_THREADFAIL_STR = "Failed to create thread";
+
 #include <stdlib.h>
 #include <string.h>
 #include <stdarg.h>