Fix const error strings

This commit is contained in:
Stephen Seo 2019-03-06 21:50:13 +09:00
parent 767e96e227
commit 1e5175d0d1
2 changed files with 14 additions and 6 deletions

View file

@ -24,12 +24,12 @@
#define UDPC_ERR_CVFAIL 5 // failed to create condition variable #define UDPC_ERR_CVFAIL 5 // failed to create condition variable
#define UDPC_ERR_THREADFAIL 6 // failed to create thread #define UDPC_ERR_THREADFAIL 6 // failed to create thread
static const char *UDPC_ERR_SOCKETFAIL_STR = "Failed to create socket"; extern const char *UDPC_ERR_SOCKETFAIL_STR;
static const char *UDPC_ERR_SOCKETBINDF_STR = "Failed to bind socket"; extern const char *UDPC_ERR_SOCKETBINDF_STR;
static const char *UDPC_ERR_SOCKETNONBF_STR = "Failed to set non-blocking on socket"; extern const char *UDPC_ERR_SOCKETNONBF_STR;
static const char *UDPC_ERR_MTXFAIL_STR = "Failed to create mutex"; extern const char *UDPC_ERR_MTXFAIL_STR;
static const char *UDPC_ERR_CVFAIL_STR = "Failed to create condition variable"; extern const char *UDPC_ERR_CVFAIL_STR;
static const char *UDPC_ERR_THREADFAIL_STR = "Failed to create thread"; extern const char *UDPC_ERR_THREADFAIL_STR;
#define UDPC_CD_AMOUNT 32 #define UDPC_CD_AMOUNT 32

View file

@ -1,5 +1,13 @@
#include "UDPC_Defines.h"
#include "UDPConnection.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 <stdlib.h>
#include <string.h> #include <string.h>
#include <stdarg.h> #include <stdarg.h>