-#define CALL_FALLBACK(socket, event) \
-if (socket->m_iocalls[event] && \
- socket->m_fbacks[event]) {\
- _GSocket_Disable(socket, event); \
- socket->m_fbacks[event](socket, event, \
- socket->m_data[event]); \
-}
-
-#define MASK_SIGNAL() \
-{ \
- void (*old_handler)(int); \
-\
- old_handler = signal(SIGPIPE, SIG_IGN);
-
-#define UNMASK_SIGNAL() \
- signal(SIGPIPE, old_handler); \
-}
-
-#if 0
-#ifndef CAN_USE_TIMEOUT
-
-#define ENABLE_TIMEOUT(socket) \
-{ \
- struct itimerval old_ival, new_ival; \
- void (*old_timer_sig)(int); \
-\
- new_ival.it_interval.tv_sec = socket->m_timeout / 1000; \
- new_ival.it_interval.tv_usec = (socket->m_timeout % 1000) * 1000; \
- setitimer(ITIMER_REAL, &new_ival, &old_ival); \
- old_timer_sig = signal(SIGALRM, _GSocket_Timer);
-
-#define DISABLE_TIMEOUT(socket) \
- signal(SIGALRM, old_timer_sig); \
- setitimer(ITIMER_REAL, &old_ival, NULL); \
+#define CALL_CALLBACK(socket, event) \
+if (socket->m_iocalls[event] && socket->m_cbacks[event]) { \
+ _GSocket_Disable(socket, event); \
+ socket->m_cbacks[event](socket, event, socket->m_data[event]); \