]> git.saurik.com Git - wxWidgets.git/commitdiff
Changed BidEndianOrdered to BigEndianOrdered in datstrm.h
authorGuilhem Lavaux <lavaux@easynet.fr>
Thu, 5 Aug 1999 17:42:09 +0000 (17:42 +0000)
committerGuilhem Lavaux <lavaux@easynet.fr>
Thu, 5 Aug 1999 17:42:09 +0000 (17:42 +0000)
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

acconfig.h
acinclude.m4
configure.in
include/wx/datstrm.h
src/common/stream.cpp
src/unix/gsocket.c

index 9e9bbb9865183ee5e3c0680528de00a5e9b71da3..203fec51bc4c041c0b6e2a2ca7f0a1e12cef9a54 100644 (file)
@@ -53,6 +53,7 @@
 #undef __ULTRIX__
 #undef __DATA_GENERAL__
 #undef __EMX__
 #undef __ULTRIX__
 #undef __DATA_GENERAL__
 #undef __EMX__
+#undef _GNU_SOURCE
 
 #undef __WINDOWS__
 #undef __WIN95__
 
 #undef __WINDOWS__
 #undef __WIN95__
index 4c235b2e915f282c4413d709c12f783840cd13e4..5f78fc17099a23be40928c30ca5e038ddae16c4b 100644 (file)
@@ -397,3 +397,27 @@ AC_DEFUN(WX_ARG_ENABLE,
           fi
         ])
 
           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
+])
index f18379995c5554d61e6745dd8c4e1f7f37376369..4d6975506f9a9038f0311e9fa57d9a30b48f965d 100644 (file)
@@ -1250,6 +1250,9 @@ WX_CPP_BOOL
 dnl check whether overloading on size_t/int parameter works
 WX_CPP_SIZE_T_IS_NOT_INT
 
 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 ---------------------------------------------------------------------------
 dnl ---------------------------------------------------------------------------
 dnl Check for functions
 dnl ---------------------------------------------------------------------------
index ee557221a2e5e7ebe8650c082de22357b92cead8..7b0fa1a613ab076ec83d3d0ed44e0ed747d1911a 100644 (file)
@@ -41,7 +41,7 @@ public:
   wxDataInputStream& operator>>(double& i);
   wxDataInputStream& operator>>(float& f);
 
   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;
  protected:
   wxInputStream *m_input;
   bool m_be_order;
@@ -69,7 +69,7 @@ class WXDLLEXPORT wxDataOutputStream {
   wxDataOutputStream& operator<<(double f);
   wxDataOutputStream& operator<<(float f);
 
   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;
  protected:
   wxOutputStream *m_output;
   bool m_be_order;
index 61de20d228ea59d3bf87c71c3d35f4f49fbb3fd9..b22e5adb46b3625cc672851de27f6873b0d4f7f6 100644 (file)
@@ -574,12 +574,12 @@ wxInputStream& wxInputStream::Read(wxOutputStream& stream_out)
 
 off_t wxInputStream::SeekI(off_t pos, wxSeekMode mode)
 {
 
 off_t wxInputStream::SeekI(off_t pos, wxSeekMode mode)
 {
-  return wxInvalidOffset;
+  return OnSysSeek(pos, mode);
 }
 
 off_t wxInputStream::TellI() const
 {
 }
 
 off_t wxInputStream::TellI() const
 {
-  return wxInvalidOffset;
+  return OnSysTell();
 }
 
 // --------------------
 }
 
 // --------------------
@@ -622,12 +622,12 @@ wxOutputStream& wxOutputStream::Write(wxInputStream& stream_in)
 
 off_t wxOutputStream::TellO() const
 {
 
 off_t wxOutputStream::TellO() const
 {
-  return wxInvalidOffset;
+  return OnSysTell();
 }
 
 off_t wxOutputStream::SeekO(off_t pos, wxSeekMode mode)
 {
 }
 
 off_t wxOutputStream::SeekO(off_t pos, wxSeekMode mode)
 {
-  return wxInvalidOffset;
+  return OnSysSeek(pos, mode);
 }
 
 void wxOutputStream::Sync()
 }
 
 void wxOutputStream::Sync()
index cdc731c3b730ee206ab396dff6443ac63eec3804..622f5e0681100e794873d7d09ee8167516408703 100644 (file)
@@ -626,7 +626,7 @@ if (socket->m_iocalls[event] && \
   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); \
   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); \
 
 #define DISABLE_TIMEOUT(socket) \
   signal(SIGALRM, old_timer_sig); \