removed :: before sigfillset as gcc on darwin ended up with errors
This commit is contained in:
parent
ebe0ac92bf
commit
2d7ca5b5d0
@ -31,7 +31,6 @@
|
|||||||
#include "../cmn/syscall.h"
|
#include "../cmn/syscall.h"
|
||||||
#include <qse/cmn/mbwc.h>
|
#include <qse/cmn/mbwc.h>
|
||||||
|
|
||||||
|
|
||||||
/////////////////////////////////
|
/////////////////////////////////
|
||||||
QSE_BEGIN_NAMESPACE(QSE)
|
QSE_BEGIN_NAMESPACE(QSE)
|
||||||
/////////////////////////////////
|
/////////////////////////////////
|
||||||
@ -51,7 +50,7 @@ public:
|
|||||||
SigScopedMutexLocker (Mutex& mutex): mutex(mutex)
|
SigScopedMutexLocker (Mutex& mutex): mutex(mutex)
|
||||||
{
|
{
|
||||||
sigset_t sigset;
|
sigset_t sigset;
|
||||||
::sigfillset (&sigset);
|
sigfillset (&sigset);
|
||||||
::sigprocmask (SIG_BLOCK, &sigset, &this->oldsigset);
|
::sigprocmask (SIG_BLOCK, &sigset, &this->oldsigset);
|
||||||
// TODO: would this work properly if this is called within a thread?
|
// TODO: would this work properly if this is called within a thread?
|
||||||
// do i need to use pthread_sigmask() conditionally?
|
// 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)
|
if (oldsa.sa_flags & SA_SIGINFO)
|
||||||
{
|
{
|
||||||
sa.sa_sigaction = dispatch_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;
|
sa.sa_flags |= SA_SIGINFO;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
sa.sa_handler = dispatch_signal;
|
sa.sa_handler = dispatch_signal;
|
||||||
::sigfillset (&sa.sa_mask);
|
sigfillset (&sa.sa_mask);
|
||||||
sa.sa_flags = 0;
|
sa.sa_flags = 0;
|
||||||
//sa.sa_flags |= SA_INTERUPT;
|
//sa.sa_flags |= SA_INTERUPT;
|
||||||
//sa.sa_flags |= SA_RESTART;
|
//sa.sa_flags |= SA_RESTART;
|
||||||
|
@ -536,7 +536,7 @@ qse_ssize_t Socket::send (const qse_ioptl_t* iov, int count) QSE_CPP_NOEXCEPT
|
|||||||
return nwritten;
|
return nwritten;
|
||||||
#else
|
#else
|
||||||
// TODO: combine to a single buffer .... use sendto....
|
// TODO: combine to a single buffer .... use sendto....
|
||||||
this->setErrorCode (E_NOIMPL);
|
this->setErrorCode (E_ENOIMPL);
|
||||||
return -1;
|
return -1;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
@ -564,7 +564,7 @@ qse_ssize_t Socket::send (const qse_ioptl_t* iov, int count, const SocketAddress
|
|||||||
return nwritten;
|
return nwritten;
|
||||||
#else
|
#else
|
||||||
// TODO: combine to a single buffer .... use sendto....
|
// TODO: combine to a single buffer .... use sendto....
|
||||||
this->setErrorCode (E_NOIMPL);
|
this->setErrorCode (E_ENOIMPL);
|
||||||
return -1;
|
return -1;
|
||||||
#endif
|
#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);
|
struct in_addr* pi = (struct in_addr*)CMSG_DATA(cmsg);
|
||||||
*pi = *(struct in_addr*)srcaddr.getIp6addr();
|
*pi = *(struct in_addr*)srcaddr.getIp6addr();
|
||||||
#else
|
#else
|
||||||
this->setErrorCode (E_NOIMPL);
|
this->setErrorCode (E_ENOIMPL);
|
||||||
return -1;
|
return -1;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
@ -654,7 +654,7 @@ qse_ssize_t Socket::send (const qse_ioptl_t* iov, int count, const SocketAddress
|
|||||||
return nwritten;
|
return nwritten;
|
||||||
#else
|
#else
|
||||||
// TODO: combine to a single buffer .... use sendto....
|
// TODO: combine to a single buffer .... use sendto....
|
||||||
this->setErrorCode (E_NOIMPL);
|
this->setErrorCode (E_ENOIMPL);
|
||||||
return -1;
|
return -1;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user