[Spread-cvs] commit: r634 - in trunk/libspread-util: buildtools include
jschultz at spread.org
jschultz at spread.org
Thu Jan 9 16:12:16 EST 2014
Author: jschultz
Date: 2014-01-09 16:12:16 -0500 (Thu, 09 Jan 2014)
New Revision: 634
Added:
trunk/libspread-util/include/spu_system.h
trunk/libspread-util/include/spu_system_defs_autoconf.h.gen
Removed:
trunk/libspread-util/include/spu_system_defs.h
trunk/libspread-util/include/spu_system_defs_autoconf.h
Modified:
trunk/libspread-util/buildtools/gen_system_include.sh
trunk/libspread-util/include/Makefile.in
Log:
Fix for auto-generation of libspread-util public headers
Modified: trunk/libspread-util/buildtools/gen_system_include.sh
===================================================================
--- trunk/libspread-util/buildtools/gen_system_include.sh 2014-01-09 21:11:37 UTC (rev 633)
+++ trunk/libspread-util/buildtools/gen_system_include.sh 2014-01-09 21:12:16 UTC (rev 634)
@@ -1,21 +1,23 @@
#! /bin/sh
-## Generate include/spu_system.h from src/config.h
+## Generate include/spu_system_defs_autoconf.h from src/config.h
+## and include/spu_system_defs_autconf.h.gen
+##
## Includes only those defines needed for the Spread Util Library API
##
-## This script takes the path to src/config.h as its only argument and
-## generates a file suitable for being included as <spu_system.h>.
+## This script takes the paths to the two above files and generates
+## a file suitable to be included by <spu_system.h>.
cat <<EOF
-/* Automatically generated by gen_system_include.sh from config.h; do not edit. */
+/* Automatically generated by gen_system_include.sh from src/config.h and include/spu_system_defs_autoconf.h.gen; do not edit. */
/* This system header contains those constants that change upon 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.
*/
-#ifndef SYSTEM_H
-#define SYSTEM_H
+#ifndef SPU_SYSTEM_DEFS_AUTOCONF_H
+#define SPU_SYSTEM_DEFS_AUTOCONF_H
EOF
@@ -43,9 +45,9 @@
---END-OF-AWK-SCRIPT---
+cat $2
+
cat <<EOF
-#include "spu_system_defs.h"
-
-#endif /* SYSTEM_H */
+#endif /* SPU_SYSTEM_DEFS_AUTOCONF_H */
EOF
Modified: trunk/libspread-util/include/Makefile.in
===================================================================
--- trunk/libspread-util/include/Makefile.in 2014-01-09 21:11:37 UTC (rev 633)
+++ trunk/libspread-util/include/Makefile.in 2014-01-09 21:12:16 UTC (rev 634)
@@ -1,5 +1,3 @@
-.SUFFIXES: .lo
-
prefix=@prefix@
exec_prefix=@exec_prefix@
bindir=@bindir@
@@ -60,37 +58,35 @@
ENT=@ENT@
EXEEXT=@EXEEXT@
-TARGETS=spu_system.h
+TARGETS=spu_system_defs_autoconf.h
-HEADER_FILES=spu_alarm.h spu_alarm_types.h spu_data_link.h spu_events.h spu_memory.h spu_objects.h spu_objects_local.h spu_scatter.h spu_system_defs.h spu_system_defs_autoconf.h spu_system_defs_windows.h
+HEADER_FILES=spu_alarm.h spu_alarm_types.h spu_data_link.h spu_events.h spu_memory.h spu_objects.h spu_objects_local.h spu_scatter.h spu_system.h spu_system_defs_autoconf.h spu_system_defs_windows.h
all: $(TARGETS)
-spu_system.h: ../src/config.h
- $(buildtoolsdir)/gen_system_include.sh ../src/config.h > spu_system.h
+spu_system_defs_autoconf.h: ../src/config.h
+ $(buildtoolsdir)/gen_system_include.sh ../src/config.h spu_system_defs_autoconf.h.gen > spu_system_defs_autoconf.h
-install-headers: spu_system.h
+install-headers: spu_system_defs_autoconf.h
$(buildtoolsdir)/mkinstalldirs $(DESTDIR)$(includedir)
for incfile in $(HEADER_FILES); \
do \
$(INSTALL) -m 644 $(srcdir)/$$incfile $(DESTDIR)$(includedir)/$$incfile; \
done
- $(INSTALL) -m 644 spu_system.h $(DESTDIR)$(includedir)/spu_system.h
clean:
- rm -f system.h
+ rm -f $(TARGETS)
distclean: clean
rm -f Makefile *~
-install: $(TARGETS) install-headers
+install: install-headers
uninstall:
for incfile in $(HEADER_FILES); \
do \
rm -f $(DESTDIR)$(includedir)/$$incfile; \
done
- rm -f $(DESTDIR)$(includedir)/spu_system.h
uninstallall: uninstall
echo "Will not remove include directory"
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-09 21:12:16 UTC (rev 634)
@@ -0,0 +1,11 @@
+
+#ifndef SPU_SYSTEM_H
+#define SPU_SYSTEM_H
+
+#ifdef _WIN32
+# include "spu_system_defs_windows.h"
+#else
+# include "spu_system_defs_autoconf.h"
+#endif
+
+#endif
Deleted: trunk/libspread-util/include/spu_system_defs.h
===================================================================
--- trunk/libspread-util/include/spu_system_defs.h 2014-01-09 21:11:37 UTC (rev 633)
+++ trunk/libspread-util/include/spu_system_defs.h 2014-01-09 21:12:16 UTC (rev 634)
@@ -1,17 +0,0 @@
-
-#ifndef SYSTEM_DEFS_H
-#define SYSTEM_DEFS_H
-
-
-#ifndef SPU_ARCH_PC_WIN95
-/* For non Windows systems, use standard headers and types */
-#include "spu_system_defs_autoconf.h"
-
-#else
-/* For Windows systems, use specified types and definitions */
-#include "spu_system_defs_windows.h"
-
-#endif /* SPU_ARCH_PC_WIN95 */
-
-
-#endif /* SYSTEM_DEFS_H */
Deleted: trunk/libspread-util/include/spu_system_defs_autoconf.h
===================================================================
--- trunk/libspread-util/include/spu_system_defs_autoconf.h 2014-01-09 21:11:37 UTC (rev 633)
+++ trunk/libspread-util/include/spu_system_defs_autoconf.h 2014-01-09 21:12:16 UTC (rev 634)
@@ -1,128 +0,0 @@
-#ifndef SYSTEM_DEFS_AUTOCONF_H
-#define SYSTEM_DEFS_AUTOCONF_H
-
-#ifndef SYSTEM_DEFS_H
-#error "system_defs_autoconf.h should never be directly included. Include system_defs.h."
-#endif
-
-#define LOC_INLINE __inline__
-
-#ifdef SPU_HAVE_STDLIB_H
-#include <stdlib.h>
-#endif
-
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <sys/param.h>
-
-#ifdef SPU_HAVE_SYS_BITYPES_H
-# include <sys/bitypes.h>
-#endif
-
-#ifdef SPU_HAVE_LIMITS_H
-# include <limits.h>
-#endif
-
-#ifndef SPU_HAVE_U_INT
-typedef unsigned int u_int;
-#endif
-
-#ifndef SPU_HAVE_INTXX_T
-# if (SPU_SIZEOF_CHAR == 1)
-typedef char int8_t;
-# else
-# error "8 bit int type not found."
-# endif
-# if (SPU_SIZEOF_SHORT_INT == 2)
-typedef short int int16_t;
-# else
-# error "16 bit int type not found."
-# endif
-# if (SPU_SIZEOF_INT == 4)
-typedef int int32_t;
-# else
-# error "32 bit int type not found."
-# endif
-#endif
-
-/* If sys/types.h does not supply u_intXX_t, supply them ourselves */
-#ifndef SPU_HAVE_U_INTXX_T
-# ifdef SPU_HAVE_UINTXX_T
-typedef uint8_t u_int8_t;
-typedef uint16_t u_int16_t;
-typedef uint32_t u_int32_t;
-# define SPU_HAVE_U_INTXX_T 1
-# else
-# if (SPU_SIZEOF_CHAR == 1)
-typedef unsigned char u_int8_t;
-# else
-# error "8 bit int type not found."
-# endif
-# if (SPU_SIZEOF_SHORT_INT == 2)
-typedef unsigned short int u_int16_t;
-# else
-# error "16 bit int type not found."
-# endif
-# if (SPU_SIZEOF_INT == 4)
-typedef unsigned int u_int32_t;
-# else
-# error "32 bit int type not found."
-# endif
-# endif
-#endif
-
-/* 64-bit types */
-#ifndef SPU_HAVE_INT64_T
-# if (SPU_SIZEOF_LONG_INT == 8)
-typedef long int int64_t;
-# define SPU_HAVE_INT64_T 1
-# else
-# if (SPU_SIZEOF_LONG_LONG_INT == 8)
-typedef long long int int64_t;
-# define SPU_HAVE_INT64_T 1
-# define SPU_HAVE_LONG_LONG_INT
-# endif
-# endif
-#endif
-#ifndef SPU_HAVE_U_INT64_T
-# if (SPU_SIZEOF_LONG_INT == 8)
-typedef unsigned long int u_int64_t;
-# define SPU_HAVE_U_INT64_T 1
-# else
-# if (SPU_SIZEOF_LONG_LONG_INT == 8)
-typedef unsigned long long int u_int64_t;
-# define SPU_HAVE_U_INT64_T 1
-# endif
-# endif
-#endif
-
-
-#ifndef byte
-#define byte u_int8_t
-#endif
-
-#ifndef int16
-#define int16 int16_t
-#endif
-
-#ifndef int16u
-#define int16u u_int16_t
-#endif
-
-#ifndef int32
-#define int32 int32_t
-#endif
-
-#ifndef int32u
-#define int32u u_int32_t
-#endif
-
-#ifdef UIO_MAXIOV
-#define SPU_ARCH_SCATTER_SIZE UIO_MAXIOV
-#else
-#define SPU_ARCH_SCATTER_SIZE 1024
-#endif
-
-
-
-#endif /* SYSTEM_DEFS_AUTOCONF_H */
Added: trunk/libspread-util/include/spu_system_defs_autoconf.h.gen
===================================================================
--- trunk/libspread-util/include/spu_system_defs_autoconf.h.gen (rev 0)
+++ trunk/libspread-util/include/spu_system_defs_autoconf.h.gen 2014-01-09 21:12:16 UTC (rev 634)
@@ -0,0 +1,139 @@
+#ifndef SPU_SYSTEM_H
+# error "spu_system_defs_autoconf.h should never be directly included. Include spu_system.h instead."
+#endif
+
+#define LOC_INLINE __inline__
+
+#ifdef SPU_HAVE_STDLIB_H
+# include <stdlib.h>
+#endif
+
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <sys/param.h>
+
+#ifdef SPU_HAVE_SYS_BITYPES_H
+# include <sys/bitypes.h>
+#endif
+
+#ifdef SPU_HAVE_LIMITS_H
+# include <limits.h>
+#endif
+
+#ifndef SPU_HAVE_U_INT
+typedef unsigned int u_int;
+#endif
+
+#ifndef SPU_HAVE_INTXX_T
+
+# if (SPU_SIZEOF_CHAR == 1)
+typedef char int8_t;
+# else
+# error "8 bit int type not found."
+# endif
+
+# if (SPU_SIZEOF_SHORT_INT == 2)
+typedef short int int16_t;
+# else
+# error "16 bit int type not found."
+# endif
+
+# if (SPU_SIZEOF_INT == 4)
+typedef int int32_t;
+# else
+# error "32 bit int type not found."
+# endif
+
+#endif
+
+/* If sys/types.h does not supply u_intXX_t, supply them ourselves */
+#ifndef SPU_HAVE_U_INTXX_T
+
+# ifdef SPU_HAVE_UINTXX_T
+typedef uint8_t u_int8_t;
+typedef uint16_t u_int16_t;
+typedef uint32_t u_int32_t;
+# define SPU_HAVE_U_INTXX_T 1
+# else
+
+# if (SPU_SIZEOF_CHAR == 1)
+typedef unsigned char u_int8_t;
+# else
+# error "8 bit int type not found."
+# endif
+
+# if (SPU_SIZEOF_SHORT_INT == 2)
+typedef unsigned short int u_int16_t;
+# else
+# error "16 bit int type not found."
+# endif
+
+# if (SPU_SIZEOF_INT == 4)
+typedef unsigned int u_int32_t;
+# else
+# error "32 bit int type not found."
+# endif
+
+# endif
+
+#endif
+
+/* 64-bit types */
+#ifndef SPU_HAVE_INT64_T
+
+# if (SPU_SIZEOF_LONG_INT == 8)
+typedef long int int64_t;
+# define SPU_HAVE_INT64_T 1
+# else
+
+# if (SPU_SIZEOF_LONG_LONG_INT == 8)
+typedef long long int int64_t;
+# define SPU_HAVE_INT64_T 1
+# define SPU_HAVE_LONG_LONG_INT
+# endif
+
+# endif
+
+#endif
+
+#ifndef SPU_HAVE_U_INT64_T
+
+# if (SPU_SIZEOF_LONG_INT == 8)
+typedef unsigned long int u_int64_t;
+# define SPU_HAVE_U_INT64_T 1
+# else
+
+# if (SPU_SIZEOF_LONG_LONG_INT == 8)
+typedef unsigned long long int u_int64_t;
+# define SPU_HAVE_U_INT64_T 1
+# endif
+
+# endif
+
+#endif
+
+#ifndef byte
+# define byte u_int8_t
+#endif
+
+#ifndef int16
+# define int16 int16_t
+#endif
+
+#ifndef int16u
+# define int16u u_int16_t
+#endif
+
+#ifndef int32
+# define int32 int32_t
+#endif
+
+#ifndef int32u
+# define int32u u_int32_t
+#endif
+
+#ifdef UIO_MAXIOV
+# define SPU_ARCH_SCATTER_SIZE UIO_MAXIOV
+#else
+# define SPU_ARCH_SCATTER_SIZE 1024
+#endif
More information about the Spread-cvs
mailing list