|
From: <gb...@us...> - 2008-07-03 05:58:16
|
Revision: 257
http://gearbox.svn.sourceforge.net/gearbox/?rev=257&view=rev
Author: gbiggs
Date: 2008-07-02 22:58:24 -0700 (Wed, 02 Jul 2008)
Log Message:
-----------
Moving some types around
Modified Paths:
--------------
gearbox/trunk/submitted/flexiport/CMakeLists.txt
gearbox/trunk/submitted/flexiport/logfile.cpp
gearbox/trunk/submitted/flexiport/logfile.h
gearbox/trunk/submitted/flexiport/port.h
gearbox/trunk/submitted/flexiport/timeout.h
Added Paths:
-----------
gearbox/trunk/submitted/flexiport/flexiport_types.h
Modified: gearbox/trunk/submitted/flexiport/CMakeLists.txt
===================================================================
--- gearbox/trunk/submitted/flexiport/CMakeLists.txt 2008-07-03 05:23:03 UTC (rev 256)
+++ gearbox/trunk/submitted/flexiport/CMakeLists.txt 2008-07-03 05:58:24 UTC (rev 257)
@@ -17,7 +17,7 @@
CONFIGURE_FILE (${flexiport_config_h_in} ${flexiport_config_h})
INCLUDE_DIRECTORIES (${CMAKE_CURRENT_BINARY_DIR})
- SET (hdrs flexiport.h port.h timeout.h ${flexiport_config_h})
+ SET (hdrs flexiport.h port.h timeout.h flexiport_types.h ${flexiport_config_h})
SET (srcs flexiport.cpp port.cpp timeout.cpp ${flexiport_config_h})
IF (FLEXIPORT_INCLUDE_SERIAL)
SET (hdrs ${hdrs} serialport.h)
Added: gearbox/trunk/submitted/flexiport/flexiport_types.h
===================================================================
--- gearbox/trunk/submitted/flexiport/flexiport_types.h (rev 0)
+++ gearbox/trunk/submitted/flexiport/flexiport_types.h 2008-07-03 05:58:24 UTC (rev 257)
@@ -0,0 +1,43 @@
+/*
+ * GearBox Project: Peer-Reviewed Open-Source Libraries for Robotics
+ * http://gearbox.sf.net/
+ * Copyright (c) 2008 Geoffrey Biggs
+ *
+ * flexiport flexible hardware data communications library.
+ *
+ * This distribution is licensed to you under the terms described in the LICENSE file included in
+ * this distribution.
+ *
+ * This work is a product of the National Institute of Advanced Industrial Science and Technology,
+ * Japan. Registration number: ___
+ *
+ * This file is part of flexiport.
+ *
+ * flexiport is free software: you can redistribute it and/or modify it under the terms of the GNU
+ * Lesser General Public License as published by the Free Software Foundation, either version 3 of
+ * the License, or (at your option) any later version.
+ *
+ * flexiport is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without
+ * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License along with flexiport.
+ * If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef __FLEXIPORT_TYPES_H
+#define __FLEXIPORT_TYPES_H
+
+#if defined (WIN32)
+ typedef unsigned char uint8_t;
+ typedef unsigned int uint32_t;
+ #if defined (_WIN64)
+ typedef __int64 ssize_t;
+ #else
+ typedef _W64 int ssize_t;
+ #endif
+#else
+ #include <stdint.h>
+#endif
+
+#endif // __FLEXIPORT_TYPES_H
Modified: gearbox/trunk/submitted/flexiport/logfile.cpp
===================================================================
--- gearbox/trunk/submitted/flexiport/logfile.cpp 2008-07-03 05:23:03 UTC (rev 256)
+++ gearbox/trunk/submitted/flexiport/logfile.cpp 2008-07-03 05:58:24 UTC (rev 257)
@@ -42,7 +42,6 @@
using namespace std;
#if defined (WIN32)
- #include <winsock2.h> // For htnol, etc
#define __func__ __FUNCTION__
#define timercmp(a, b, CMP) \
(((a)->tv_sec == (b)->tv_sec) ? \
Modified: gearbox/trunk/submitted/flexiport/logfile.h
===================================================================
--- gearbox/trunk/submitted/flexiport/logfile.h 2008-07-03 05:23:03 UTC (rev 256)
+++ gearbox/trunk/submitted/flexiport/logfile.h 2008-07-03 05:58:24 UTC (rev 257)
@@ -28,7 +28,11 @@
#ifndef __LOGFILE_H
#define __LOGFILE_H
-#include <sys/time.h>
+#if defined (WIN32)
+ #include <winsock2.h> // For timeval
+#else
+ #include <sys/time.h>
+#endif
#include <string>
#include <vector>
Modified: gearbox/trunk/submitted/flexiport/port.h
===================================================================
--- gearbox/trunk/submitted/flexiport/port.h 2008-07-03 05:23:03 UTC (rev 256)
+++ gearbox/trunk/submitted/flexiport/port.h 2008-07-03 05:58:24 UTC (rev 257)
@@ -32,23 +32,16 @@
#include <map>
#if defined (WIN32)
- typedef unsigned char uint8_t;
- typedef unsigned int uint32_t;
- #if defined (_WIN64)
- typedef __int64 ssize_t;
- #else
- typedef _W64 int ssize_t;
- #endif
#if defined (FLEXIPORT_EXPORTS)
#define FLEXIPORT_EXPORT __declspec (dllexport)
#else
#define FLEXIPORT_EXPORT __declspec (dllimport)
#endif
#else
- #include <stdint.h>
#define FLEXIPORT_EXPORT
#endif
+#include "flexiport_types.h"
#include "timeout.h"
/** @ingroup gbx_library_flexiport
Modified: gearbox/trunk/submitted/flexiport/timeout.h
===================================================================
--- gearbox/trunk/submitted/flexiport/timeout.h 2008-07-03 05:23:03 UTC (rev 256)
+++ gearbox/trunk/submitted/flexiport/timeout.h 2008-07-03 05:58:24 UTC (rev 257)
@@ -32,17 +32,17 @@
#include <string>
#if defined (WIN32)
+ #if defined (FLEXIPORT_EXPORTS)
+ #define FLEXIPORT_EXPORT __declspec (dllexport)
+ #else
+ #define FLEXIPORT_EXPORT __declspec (dllimport)
+ #endif
// No timespec on Windows
typedef struct timespec
{
int tv_sec;
int tv_nsec;
} timespec;
- #if defined (FLEXIPORT_EXPORTS)
- #define FLEXIPORT_EXPORT __declspec (dllexport)
- #else
- #define FLEXIPORT_EXPORT __declspec (dllimport)
- #endif
#else
#define FLEXIPORT_EXPORT
#endif
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|