Revision: 6953 http://playerstage.svn.sourceforge.net/playerstage/?rev=6953&view=rev Author: gbiggs Date: 2008-08-15 00:55:29 +0000 (Fri, 15 Aug 2008)
Log Message: ----------- Fixed bug 2051127, added -lrt for Solaris where necessary, fixed some missing includes. Modified Paths: -------------- code/player/trunk/client_libs/libplayerc/CMakeLists.txt code/player/trunk/examples/libplayerc++/CMakeLists.txt code/player/trunk/examples/libplayerc++/CMakeLists.txt.example.in code/player/trunk/libplayertcp/CMakeLists.txt code/player/trunk/server/CMakeLists.txt code/player/trunk/server/drivers/laser/lms400_cola.cc code/player/trunk/server/drivers/laser/sicklms200.cc code/player/trunk/server/drivers/mixed/erratic/erratic.cc code/player/trunk/server/libplayerdrivers/CMakeLists.txt code/player/trunk/utils/playerv/CMakeLists.txt Modified: code/player/trunk/client_libs/libplayerc/CMakeLists.txt =================================================================== --- code/player/trunk/client_libs/libplayerc/CMakeLists.txt 2008-08-14 15:03:10 UTC (rev 6952) +++ code/player/trunk/client_libs/libplayerc/CMakeLists.txt 2008-08-15 00:55:29 UTC (rev 6953) @@ -69,7 +69,7 @@ IF (PLAYER_OS_QNX) TARGET_LINK_LIBRARIES (playerc socket rpc) ELSEIF (PLAYER_OS_SOLARIS) - TARGET_LINK_LIBRARIES (playerc socket nsl) + TARGET_LINK_LIBRARIES (playerc socket nsl rt) ENDIF (PLAYER_OS_QNX) PLAYER_INSTALL_HEADERS (playerc playerc.h) Modified: code/player/trunk/examples/libplayerc++/CMakeLists.txt =================================================================== --- code/player/trunk/examples/libplayerc++/CMakeLists.txt 2008-08-14 15:03:10 UTC (rev 6952) +++ code/player/trunk/examples/libplayerc++/CMakeLists.txt 2008-08-15 00:55:29 UTC (rev 6953) @@ -11,6 +11,9 @@ MACRO (PLAYERCPP_ADD_EXAMPLE _name) ADD_EXECUTABLE (${_name} ${ARGN}) TARGET_LINK_LIBRARIES (${_name} playerc++ playerc playerxdr playererror ${PLAYERC_EXTRA_LINK_LIBRARIES} ${PLAYERCC_EXTRA_LINK_LIBRARIES}) + IF (PLAYER_OS_SOLARIS) + TARGET_LINK_LIBRARIES (${_name} rt) + ENDIF (PLAYER_OS_SOLARIS) ENDMACRO (PLAYERCPP_ADD_EXAMPLE _name) PLAYERCPP_ADD_EXAMPLE (camera camera.cc) Modified: code/player/trunk/examples/libplayerc++/CMakeLists.txt.example.in =================================================================== --- code/player/trunk/examples/libplayerc++/CMakeLists.txt.example.in 2008-08-14 15:03:10 UTC (rev 6952) +++ code/player/trunk/examples/libplayerc++/CMakeLists.txt.example.in 2008-08-15 00:55:29 UTC (rev 6953) @@ -4,6 +4,10 @@ SET (CMAKE_MODULE_PATH @CMAKE_INSTALL_PREFIX@/share/cmake/Modules) INCLUDE (UsePlayerC++) +IF (PLAYER_OS_SOLARIS) + SET (rtLibFlag -lrt) +ENDIF (PLAYER_OS_SOLARIS) + PLAYER_ADD_PLAYERCPP_CLIENT (camera SOURCES camera.cc) PLAYER_ADD_PLAYERCPP_CLIENT (example0 SOURCES example0.cc) PLAYER_ADD_PLAYERCPP_CLIENT (example4 SOURCES example4.cc) @@ -21,10 +25,10 @@ SET (HAVE_BOOST_SIGNALS @USE_BOOST_SIGNALS@) IF (HAVE_BOOST_THREADS OR HAVE_BOOST_SIGNALS) - PLAYER_ADD_PLAYERCPP_CLIENT (example1 SOURCES example1.cc) + PLAYER_ADD_PLAYERCPP_CLIENT (example1 SOURCES example1.cc LINKFLAGS ${rtLibFlag}) PLAYER_ADD_PLAYERCPP_CLIENT (example3 SOURCES example3.cc) - PLAYER_ADD_PLAYERCPP_CLIENT (goto SOURCES goto.cc) - PLAYER_ADD_PLAYERCPP_CLIENT (speech_cpp_client SOURCES speech_cpp_client.cc) + PLAYER_ADD_PLAYERCPP_CLIENT (goto SOURCES goto.cc LINKFLAGS ${rtLibFlag}) + PLAYER_ADD_PLAYERCPP_CLIENT (speech_cpp_client SOURCES speech_cpp_client.cc LINKFLAGS ${rtLibFlag}) ENDIF (HAVE_BOOST_THREADS OR HAVE_BOOST_SIGNALS) IF (HAVE_BOOST_SIGNALS) Modified: code/player/trunk/libplayertcp/CMakeLists.txt =================================================================== --- code/player/trunk/libplayertcp/CMakeLists.txt 2008-08-14 15:03:10 UTC (rev 6952) +++ code/player/trunk/libplayertcp/CMakeLists.txt 2008-08-15 00:55:29 UTC (rev 6953) @@ -34,8 +34,13 @@ PLAYER_ADD_LINK_LIB (z) SET (zLibFlag -lz) ENDIF (HAVE_Z) + IF (PLAYER_OS_SOLARIS) + TARGET_LINK_LIBRARIES (playertcp rt) + PLAYER_ADD_LINK_LIB (rt) + SET (rtLibFlag -lrt) + ENDIF (PLAYER_OS_SOLARIS) PLAYER_MAKE_PKGCONFIG ("playertcp" "Player TCP messaging library - part of the Player Project" - "playererror playercore" "" "" "${zLibFlag} ${SOCKET_LIBS_FLAGS}") + "playererror playercore" "" "" "${zLibFlag} ${rtLibFlag} ${SOCKET_LIBS_FLAGS}") PLAYER_INSTALL_HEADERS (playertcp playertcp.h) ENDIF (INCLUDE_TCP) Modified: code/player/trunk/server/CMakeLists.txt =================================================================== --- code/player/trunk/server/CMakeLists.txt 2008-08-14 15:03:10 UTC (rev 6952) +++ code/player/trunk/server/CMakeLists.txt 2008-08-15 00:55:29 UTC (rev 6953) @@ -24,6 +24,9 @@ IF (HAVE_PLAYERSD) TARGET_LINK_LIBRARIES (player playersd) ENDIF (HAVE_PLAYERSD) +IF (PLAYER_OS_SOLARIS) + TARGET_LINK_LIBRARIES (player rt) +ENDIF (PLAYER_OS_SOLARIS) STRING (REGEX REPLACE "^[ ]+" "" PLAYER_DRIVERSLIB_LINKFLAGS "${PLAYER_DRIVERSLIB_LINKFLAGS}") STRING (REGEX REPLACE "[ ]+$" "" PLAYER_DRIVERSLIB_LINKFLAGS "${PLAYER_DRIVERSLIB_LINKFLAGS}") IF (PLAYER_DRIVERSLIB_LINKFLAGS) Modified: code/player/trunk/server/drivers/laser/lms400_cola.cc =================================================================== --- code/player/trunk/server/drivers/laser/lms400_cola.cc 2008-08-14 15:03:10 UTC (rev 6952) +++ code/player/trunk/server/drivers/laser/lms400_cola.cc 2008-08-15 00:55:29 UTC (rev 6953) @@ -10,6 +10,7 @@ #include "lms400_cola.h" #include <unistd.h> +#include <strings.h> //////////////////////////////////////////////////////////////////////////////// // Constructor. @@ -18,7 +19,7 @@ portno = port; hostname = host; verbose = debug_mode; - bzero (command, BUF_SIZE); + memset (command, 0, BUF_SIZE); MeasurementQueue = new std::vector<MeasurementQueueElement_t >; } @@ -39,12 +40,12 @@ return (-1); // Fill in the sockaddr_in structure values - bzero ((char *) &serv_addr, sizeof (serv_addr)); + memset ((char *) &serv_addr, 0, sizeof (serv_addr)); serv_addr.sin_family = AF_INET; serv_addr.sin_port = htons (portno); - bcopy ((char *)server->h_addr, - (char *)&serv_addr.sin_addr.s_addr, - server->h_length); + memcpy ((char *)&serv_addr.sin_addr.s_addr, + (char *)server->h_addr, + server->h_length); // Attempt to connect if (connect (sockfd, (const sockaddr*)&serv_addr, sizeof (serv_addr)) < 0) @@ -364,7 +365,7 @@ int length = 0; int current = 0; - bzero (buffer, 256); + memset (buffer, 0, 256); if (!MeasurementQueue->empty ()) { if (verbose) printf (">>> Reading from queue...\n"); @@ -501,7 +502,7 @@ int lms400_cola::ReadResult () { - bzero (buffer, 256); + memset (buffer, 0, 256); n = read (sockfd, buffer, 8); if (n < 0) return (-1); Modified: code/player/trunk/server/drivers/laser/sicklms200.cc =================================================================== --- code/player/trunk/server/drivers/laser/sicklms200.cc 2008-08-14 15:03:10 UTC (rev 6952) +++ code/player/trunk/server/drivers/laser/sicklms200.cc 2008-08-15 00:55:29 UTC (rev 6953) @@ -211,7 +211,7 @@ #include <libplayercore/playercore.h> #include <libplayerxdr/playerxdr.h> -//#include <replace/replace.h> +#include <replace/replace.h> extern PlayerTime* GlobalTime; #define DEFAULT_LASER_PORT "/dev/ttyS1" Modified: code/player/trunk/server/drivers/mixed/erratic/erratic.cc =================================================================== --- code/player/trunk/server/drivers/mixed/erratic/erratic.cc 2008-08-14 15:03:10 UTC (rev 6952) +++ code/player/trunk/server/drivers/mixed/erratic/erratic.cc 2008-08-15 00:55:29 UTC (rev 6953) @@ -177,6 +177,7 @@ #include <math.h> #include <termios.h> #include <stdlib.h> // for abs() +#include <sys/stat.h> #include "erratic.h" Modified: code/player/trunk/server/libplayerdrivers/CMakeLists.txt =================================================================== --- code/player/trunk/server/libplayerdrivers/CMakeLists.txt 2008-08-14 15:03:10 UTC (rev 6952) +++ code/player/trunk/server/libplayerdrivers/CMakeLists.txt 2008-08-15 00:55:29 UTC (rev 6953) @@ -45,7 +45,6 @@ ENDIF (NOT HAVE_ROUND) FILTER_DUPLICATES (driversSrcs "${driversSrcs}") -# MESSAGE (STATUS "Sources is ${driversSrcs}") # Set lib-wide link and include directories IF (PLAYER_DRIVERSLIB_INCLUDEDIRS) @@ -65,6 +64,9 @@ IF (HAVE_JPEG) TARGET_LINK_LIBRARIES (playerdrivers playerjpeg) ENDIF (HAVE_JPEG) +IF (PLAYER_OS_SOLARIS) + TARGET_LINK_LIBRARIES (playerdrivers rt) +ENDIF (PLAYER_OS_SOLARIS) # Set C flags on source files that need them FOREACH (driverName ${PLAYER_BUILT_DRIVERS}) Modified: code/player/trunk/utils/playerv/CMakeLists.txt =================================================================== --- code/player/trunk/utils/playerv/CMakeLists.txt 2008-08-14 15:03:10 UTC (rev 6952) +++ code/player/trunk/utils/playerv/CMakeLists.txt 2008-08-15 00:55:29 UTC (rev 6953) @@ -28,6 +28,9 @@ INCLUDE_DIRECTORIES (${PROJECT_SOURCE_DIR}/client_libs ${GTK_INCLUDEDIR}) PLAYER_ADD_EXECUTABLE (playerv ${playervSrcs}) TARGET_LINK_LIBRARIES (playerv playerc playerxdr playererror playerutils rtk ${PLAYERC_EXTRA_LINK_LIBRARIES}) + IF (PLAYER_OS_SOLARIS) + TARGET_LINK_LIBRARIES (playerv rt) + ENDIF (PLAYER_OS_SOLARIS) SET_SOURCE_FILES_PROPERTIES (${playervSrcs} PROPERTIES COMPILE_FLAGS "${GTK_CFLAGS}") SET_TARGET_PROPERTIES (playerv PROPERTIES This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Playerstage-commit mailing list Playerstage-commit@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/playerstage-commit