Seek and Tell do the right thing in wxIn/OutputStream now
Check for GNU extension in configure.in: this is needed for GLIBC 2.1/GCC 2.95
-> this enables _GNU_SOURCE
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3293
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
#undef __ULTRIX__
#undef __DATA_GENERAL__
#undef __EMX__
+#undef _GNU_SOURCE
#undef __WINDOWS__
#undef __WIN95__
fi
])
+dnl -
+dnl - GNU libc extension (added by GL)
+dnl -
+
+AC_DEFUN(WX_GNU_EXTENSIONS,
+[
+AC_MSG_CHECKING([if you need GNU extensions])
+AC_CACHE_VAL(wx_cv_gnu_extensions,[
+ AC_TRY_COMPILE([#include <features.h>],[
+
+#ifndef __GNU_LIBRARY__
+ Compile error wanted
+#endif
+
+],
+ [wx_cv_gnu_extensions=yes],
+ [wx_cv_gnu_extensions=no])
+])
+
+AC_MSG_RESULT($wx_cv_gnu_extensions)
+if test "$wx_cv_gnu_extensions" = "yes"; then
+ AC_DEFINE_UNQUOTED(_GNU_SOURCE)
+fi
+])
dnl check whether overloading on size_t/int parameter works
WX_CPP_SIZE_T_IS_NOT_INT
+dnl check whether we should define _GNU_SOURCE
+WX_GNU_EXTENSIONS
+
dnl ---------------------------------------------------------------------------
dnl Check for functions
dnl ---------------------------------------------------------------------------
wxDataInputStream& operator>>(double& i);
wxDataInputStream& operator>>(float& f);
- void BidEndianOrdered(bool be_order) { m_be_order = be_order; }
+ void BigEndianOrdered(bool be_order) { m_be_order = be_order; }
protected:
wxInputStream *m_input;
bool m_be_order;
wxDataOutputStream& operator<<(double f);
wxDataOutputStream& operator<<(float f);
- void BidEndianOrdered(bool be_order) { m_be_order = be_order; }
+ void BigEndianOrdered(bool be_order) { m_be_order = be_order; }
protected:
wxOutputStream *m_output;
bool m_be_order;
off_t wxInputStream::SeekI(off_t pos, wxSeekMode mode)
{
- return wxInvalidOffset;
+ return OnSysSeek(pos, mode);
}
off_t wxInputStream::TellI() const
{
- return wxInvalidOffset;
+ return OnSysTell();
}
// --------------------
off_t wxOutputStream::TellO() const
{
- return wxInvalidOffset;
+ return OnSysTell();
}
off_t wxOutputStream::SeekO(off_t pos, wxSeekMode mode)
{
- return wxInvalidOffset;
+ return OnSysSeek(pos, mode);
}
void wxOutputStream::Sync()
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);
+ old_timer_sig = signal(SIGALRM, SIG_DFL);
#define DISABLE_TIMEOUT(socket) \
signal(SIGALRM, old_timer_sig); \