[Spread-cvs] commit: r639 - in trunk/libspread-util: buildtools include

jschultz at spread.org jschultz at spread.org
Tue Jan 14 02:36:40 EST 2014


Author: jschultz
Date: 2014-01-14 02:36:40 -0500 (Tue, 14 Jan 2014)
New Revision: 639

Added:
   trunk/libspread-util/include/spu_system_defs.h
   trunk/libspread-util/include/spu_system_defs_autoconf.h
Removed:
   trunk/libspread-util/include/spu_system.h
   trunk/libspread-util/include/spu_system_defs_autoconf.h.gen
Modified:
   trunk/libspread-util/buildtools/gen_system_include.sh
   trunk/libspread-util/include/Makefile.in
Log:
Undo of last change


Modified: trunk/libspread-util/buildtools/gen_system_include.sh
===================================================================
--- trunk/libspread-util/buildtools/gen_system_include.sh	2014-01-13 20:19:50 UTC (rev 638)
+++ trunk/libspread-util/buildtools/gen_system_include.sh	2014-01-14 07:36:40 UTC (rev 639)
@@ -1,23 +1,21 @@
 #! /bin/sh
 
-## Generate include/spu_system_defs_autoconf.h from src/config.h 
-## and include/spu_system_defs_autconf.h.gen
-##
+## Generate include/spu_system.h from src/config.h 
 ## Includes only those defines needed for the Spread Util Library API
 ##
-## This script takes the paths to the two above files and generates 
-## a file suitable to be included by <spu_system.h>.  
+##  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>.  
 
 cat <<EOF
-/* Automatically generated by gen_system_include.sh from src/config.h and include/spu_system_defs_autoconf.h.gen; do not edit. */
+/* Automatically generated by gen_system_include.sh from config.h; 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 SPU_SYSTEM_DEFS_AUTOCONF_H
-#define SPU_SYSTEM_DEFS_AUTOCONF_H
+#ifndef SYSTEM_H
+#define SYSTEM_H
 
 EOF
 
@@ -45,9 +43,9 @@
 
 ---END-OF-AWK-SCRIPT---
 
-cat $2
-
 cat <<EOF
 
-#endif /* SPU_SYSTEM_DEFS_AUTOCONF_H */
+#include "spu_system_defs.h"
+
+#endif /* SYSTEM_H */
 EOF

Modified: trunk/libspread-util/include/Makefile.in
===================================================================
--- trunk/libspread-util/include/Makefile.in	2014-01-13 20:19:50 UTC (rev 638)
+++ trunk/libspread-util/include/Makefile.in	2014-01-14 07:36:40 UTC (rev 639)
@@ -1,3 +1,5 @@
+.SUFFIXES: .lo
+
 prefix=@prefix@
 exec_prefix=@exec_prefix@
 bindir=@bindir@
@@ -58,35 +60,37 @@
 ENT=@ENT@
 EXEEXT=@EXEEXT@
 
-TARGETS=spu_system_defs_autoconf.h
+TARGETS=spu_system.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
+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
 
 all: $(TARGETS)
 
-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
+spu_system.h: ../src/config.h
+	$(buildtoolsdir)/gen_system_include.sh ../src/config.h > spu_system.h
 
-install-headers: spu_system_defs_autoconf.h
+install-headers: spu_system.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 $(TARGETS)
+	rm -f system.h
 
 distclean: clean
 	rm -f Makefile *~
 
-install: install-headers
+install: $(TARGETS) 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"

Deleted: trunk/libspread-util/include/spu_system.h
===================================================================
--- trunk/libspread-util/include/spu_system.h	2014-01-13 20:19:50 UTC (rev 638)
+++ trunk/libspread-util/include/spu_system.h	2014-01-14 07:36:40 UTC (rev 639)
@@ -1,11 +0,0 @@
-
-#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

Copied: trunk/libspread-util/include/spu_system_defs.h (from rev 633, trunk/libspread-util/include/spu_system_defs.h)
===================================================================
--- trunk/libspread-util/include/spu_system_defs.h	                        (rev 0)
+++ trunk/libspread-util/include/spu_system_defs.h	2014-01-14 07:36:40 UTC (rev 639)
@@ -0,0 +1,17 @@
+
+#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 */

Copied: trunk/libspread-util/include/spu_system_defs_autoconf.h (from rev 633, trunk/libspread-util/include/spu_system_defs_autoconf.h)
===================================================================
--- trunk/libspread-util/include/spu_system_defs_autoconf.h	                        (rev 0)
+++ trunk/libspread-util/include/spu_system_defs_autoconf.h	2014-01-14 07:36:40 UTC (rev 639)
@@ -0,0 +1,128 @@
+#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 */

Deleted: trunk/libspread-util/include/spu_system_defs_autoconf.h.gen
===================================================================
--- trunk/libspread-util/include/spu_system_defs_autoconf.h.gen	2014-01-13 20:19:50 UTC (rev 638)
+++ trunk/libspread-util/include/spu_system_defs_autoconf.h.gen	2014-01-14 07:36:40 UTC (rev 639)
@@ -1,139 +0,0 @@
-#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