[Marble-commits] KDE/kdeedu/marble/src/plugins/render/aprs

Wes Hardaker wjhns25 at hardakers.net
Wed Jul 7 01:21:33 CEST 2010


SVN commit 1146893 by hardaker:

BUG: 237931 - Check for cfmakeraw as some OSes (eg solaris) do not have it

 M  +6 -0      CMakeLists.txt  
 A             aprsconfig.h.in  
 M  +12 -0     posix_qextserialport.cpp  


--- trunk/KDE/kdeedu/marble/src/plugins/render/aprs/CMakeLists.txt #1146892:1146893
@@ -1,5 +1,8 @@
 PROJECT(AprsPlugin)
 
+INCLUDE (CheckFunctionExists)
+CHECK_FUNCTION_EXISTS(cfmakeraw HAVE_CFMAKERAW)
+
 INCLUDE_DIRECTORIES(
  ${CMAKE_CURRENT_SOURCE_DIR}/src/plugins/render/aprs
  ${CMAKE_BINARY_DIR}/src/plugins/render/aprs
@@ -36,3 +39,6 @@
 
 marble_add_plugin( AprsPlugin ${aprs_SRCS} )
 #target_link_libraries( Aprs ${QT_QTWEBKIT_LIBRARY} )
+
+CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/aprsconfig.h.in
+	       ${CMAKE_CURRENT_BINARY_DIR}/aprsconfig.h)
--- trunk/KDE/kdeedu/marble/src/plugins/render/aprs/posix_qextserialport.cpp #1146892:1146893
@@ -694,7 +694,19 @@
             setOpenMode(mode);              // Flag the port as opened
             tcgetattr(fd, &old_termios);    // Save the old termios
             Posix_CommConfig = old_termios; // Make a working copy
+
+
+            /* the equivelent of cfmakeraw() to enable raw access */
+#ifdef HAVE_CFMAKERAW
             cfmakeraw(&Posix_CommConfig);   // Enable raw access
+#else
+            Posix_CommConfig.c_iflag &= ~(IGNBRK | BRKINT | PARMRK | ISTRIP
+                                    | INLCR | IGNCR | ICRNL | IXON);
+            Posix_CommConfig.c_oflag &= ~OPOST;
+            Posix_CommConfig.c_lflag &= ~(ECHO | ECHONL | ICANON | ISIG | IEXTEN);
+            Posix_CommConfig.c_cflag &= ~(CSIZE | PARENB);
+            Posix_CommConfig.c_cflag |= CS8;
+#endif
 
             /*set up other port settings*/
             Posix_CommConfig.c_cflag|=CREAD|CLOCAL;


More information about the Marble-commits mailing list