From 2d7ca5b5d0f21c1fa753f450ff54ca63aec520d4 Mon Sep 17 00:00:00 2001 From: hyung-hwan Date: Sat, 27 Oct 2018 10:18:01 +0000 Subject: [PATCH] removed :: before sigfillset as gcc on darwin ended up with errors --- qse/lib/si/App.cpp | 7 +++---- qse/lib/si/Socket.cpp | 8 ++++---- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/qse/lib/si/App.cpp b/qse/lib/si/App.cpp index 2217008b..59951080 100644 --- a/qse/lib/si/App.cpp +++ b/qse/lib/si/App.cpp @@ -31,7 +31,6 @@ #include "../cmn/syscall.h" #include - ///////////////////////////////// QSE_BEGIN_NAMESPACE(QSE) ///////////////////////////////// @@ -51,7 +50,7 @@ public: SigScopedMutexLocker (Mutex& mutex): mutex(mutex) { sigset_t sigset; - ::sigfillset (&sigset); + sigfillset (&sigset); ::sigprocmask (SIG_BLOCK, &sigset, &this->oldsigset); // TODO: would this work properly if this is called within a thread? // do i need to use pthread_sigmask() conditionally? @@ -271,13 +270,13 @@ int App::set_signal_handler_no_mutex (int sig, SignalHandler sighr) if (oldsa.sa_flags & SA_SIGINFO) { sa.sa_sigaction = dispatch_siginfo; - ::sigfillset (&sa.sa_mask); // block all signals while the handler is being executed + sigfillset (&sa.sa_mask); // block all signals while the handler is being executed sa.sa_flags |= SA_SIGINFO; } else { sa.sa_handler = dispatch_signal; - ::sigfillset (&sa.sa_mask); + sigfillset (&sa.sa_mask); sa.sa_flags = 0; //sa.sa_flags |= SA_INTERUPT; //sa.sa_flags |= SA_RESTART; diff --git a/qse/lib/si/Socket.cpp b/qse/lib/si/Socket.cpp index 639017bc..ae03b424 100644 --- a/qse/lib/si/Socket.cpp +++ b/qse/lib/si/Socket.cpp @@ -536,7 +536,7 @@ qse_ssize_t Socket::send (const qse_ioptl_t* iov, int count) QSE_CPP_NOEXCEPT return nwritten; #else // TODO: combine to a single buffer .... use sendto.... - this->setErrorCode (E_NOIMPL); + this->setErrorCode (E_ENOIMPL); return -1; #endif } @@ -564,7 +564,7 @@ qse_ssize_t Socket::send (const qse_ioptl_t* iov, int count, const SocketAddress return nwritten; #else // TODO: combine to a single buffer .... use sendto.... - this->setErrorCode (E_NOIMPL); + this->setErrorCode (E_ENOIMPL); return -1; #endif } @@ -617,7 +617,7 @@ qse_ssize_t Socket::send (const qse_ioptl_t* iov, int count, const SocketAddress struct in_addr* pi = (struct in_addr*)CMSG_DATA(cmsg); *pi = *(struct in_addr*)srcaddr.getIp6addr(); #else - this->setErrorCode (E_NOIMPL); + this->setErrorCode (E_ENOIMPL); return -1; #endif } @@ -654,7 +654,7 @@ qse_ssize_t Socket::send (const qse_ioptl_t* iov, int count, const SocketAddress return nwritten; #else // TODO: combine to a single buffer .... use sendto.... - this->setErrorCode (E_NOIMPL); + this->setErrorCode (E_ENOIMPL); return -1; #endif