[Spread-cvs] commit: r644 - in trunk: daemon libspread libspread-util/include
jschultz at spread.org
jschultz at spread.org
Tue Jan 14 06:25:04 EST 2014
Author: jschultz
Date: 2014-01-14 06:25:03 -0500 (Tue, 14 Jan 2014)
New Revision: 644
Added:
trunk/libspread-util/include/spu_system.h
trunk/libspread-util/include/spu_system.h.win32
Modified:
trunk/daemon/ip_enum.c
trunk/daemon/monitor.c
trunk/libspread/sp.c
Log:
Couple of bugfixes and adding default spu_system and a copy.
Modified: trunk/daemon/ip_enum.c
===================================================================
--- trunk/daemon/ip_enum.c 2014-01-14 11:18:48 UTC (rev 643)
+++ trunk/daemon/ip_enum.c 2014-01-14 11:25:03 UTC (rev 644)
@@ -33,15 +33,17 @@
*/
#include <string.h>
-#include <netdb.h>
#ifndef ARCH_PC_WIN95
+# include <netdb.h>
# include <net/if.h>
# include <sys/ioctl.h>
# include <netinet/in.h>
# ifdef sun
# include <sys/sockio.h> /* for SIOCGIFCONF */
# endif
+#else
+# include <WinSock2.h>
#endif
#include "ip_enum.h"
Modified: trunk/daemon/monitor.c
===================================================================
--- trunk/daemon/monitor.c 2014-01-14 11:18:48 UTC (rev 643)
+++ trunk/daemon/monitor.c 2014-01-14 11:25:03 UTC (rev 644)
@@ -1128,7 +1128,7 @@
errno = 0; tmp = strtol(argv[1], &end, 0);
- if (errno != 0 || *end != 0 || end == argv[1] || tmp < 0 || tmp > UINT16_MAX) {
+ if (errno != 0 || *end != 0 || end == argv[1] || tmp < 0 || tmp > 65535) {
Exit_Usage(exe, "Port number must be in range [0, 65536):", argv[1]);
}
Modified: trunk/libspread/sp.c
===================================================================
--- trunk/libspread/sp.c 2014-01-14 11:18:48 UTC (rev 643)
+++ trunk/libspread/sp.c 2014-01-14 11:25:03 UTC (rev 644)
@@ -622,7 +622,7 @@
#else /* ARCH_PC_WIN95 */
/* win32: intentional fall through this case to option <port_num>@<host_name> where <host_name> = localhost */
- strcpy( hostname, "@localhost" );
+ strcpy( host_name, "@localhost" );
#endif /* ARCH_PC_WIN95 */
case 2: /* option <port_num>@<host_name> */
Added: trunk/libspread-util/include/spu_system.h
===================================================================
--- trunk/libspread-util/include/spu_system.h (rev 0)
+++ trunk/libspread-util/include/spu_system.h 2014-01-14 11:25:03 UTC (rev 644)
@@ -0,0 +1,31 @@
+/* This system header contains those constants that change upon autoconf compilation and are
+ * required for the Spread Util Library API. These should not conflict with any other
+ * definitions in other software and should be safe to include in other software. This file
+ * contains static definitions of the normally autoconf generated constants for a static
+ * build on Windows.
+ */
+
+#ifndef SYSTEM_H
+#define SYSTEM_H
+
+#define SPU_ARCH_PC_WIN95 1
+#define SPU_HAVE_STDLIB_H 1
+#define SPU_HAVE_LIMITS_H 1
+#define SPU_SIZEOF_CHAR 1
+#define SPU_SIZEOF_SHORT_INT 2
+#define SPU_SIZEOF_INT 4
+#define SPU_SIZEOF_LONG_INT 4
+#define SPU_SIZEOF_LONG_LONG_INT 8
+
+#undef SPU_HAVE_UINTXX_T
+#undef SPU_HAVE_U_INT
+#undef SPU_HAVE_U_INT64_T
+#undef SPU_HAVE_U_INTXX_T
+#undef SPU_HAVE_INT64_T
+#undef SPU_HAVE_INTXX_T
+#undef SPU_HAVE_INTTYPES_H
+#undef SPU_HAVE_SYS_BITYPES_H
+
+#include "spu_system_defs.h"
+
+#endif /* SYSTEM_H */
Added: trunk/libspread-util/include/spu_system.h.win32
===================================================================
--- trunk/libspread-util/include/spu_system.h.win32 (rev 0)
+++ trunk/libspread-util/include/spu_system.h.win32 2014-01-14 11:25:03 UTC (rev 644)
@@ -0,0 +1,31 @@
+/* This system header contains those constants that change upon autoconf compilation and are
+ * required for the Spread Util Library API. These should not conflict with any other
+ * definitions in other software and should be safe to include in other software. This file
+ * contains static definitions of the normally autoconf generated constants for a static
+ * build on Windows.
+ */
+
+#ifndef SYSTEM_H
+#define SYSTEM_H
+
+#define SPU_ARCH_PC_WIN95 1
+#define SPU_HAVE_STDLIB_H 1
+#define SPU_HAVE_LIMITS_H 1
+#define SPU_SIZEOF_CHAR 1
+#define SPU_SIZEOF_SHORT_INT 2
+#define SPU_SIZEOF_INT 4
+#define SPU_SIZEOF_LONG_INT 4
+#define SPU_SIZEOF_LONG_LONG_INT 8
+
+#undef SPU_HAVE_UINTXX_T
+#undef SPU_HAVE_U_INT
+#undef SPU_HAVE_U_INT64_T
+#undef SPU_HAVE_U_INTXX_T
+#undef SPU_HAVE_INT64_T
+#undef SPU_HAVE_INTXX_T
+#undef SPU_HAVE_INTTYPES_H
+#undef SPU_HAVE_SYS_BITYPES_H
+
+#include "spu_system_defs.h"
+
+#endif /* SYSTEM_H */
More information about the Spread-cvs
mailing list