[Lsb-messages] /var/www/bzr/lsb/devel/devchk r2382: apply missing_headers hack for the new lsb/ headers

Mats Wichmann mats at linuxfoundation.org
Fri Aug 30 14:18:03 UTC 2013


------------------------------------------------------------
revno: 2382
committer: Mats Wichmann <mats at linuxfoundation.org>
branch nick: devchk
timestamp: Fri 2013-08-30 08:18:03 -0600
message:
  apply missing_headers hack for the new lsb/ headers
added:
  ts/devchk/missing_headers/lsb/
  ts/devchk/missing_headers/lsb/Composite.h
  ts/devchk/missing_headers/lsb/pthread.h
  ts/devchk/missing_headers/lsb/time.h
  ts/devchk/missing_headers/lsb/types.h
  ts/devchk/missing_headers/lsb/wchar.h
modified:
  ts/devchk/missing_headers/README
-------------- next part --------------
=== modified file 'ts/devchk/missing_headers/README'
--- a/ts/devchk/missing_headers/README	2011-12-08 09:18:09 +0000
+++ b/ts/devchk/missing_headers/README	2013-08-30 14:18:03 +0000
@@ -1,6 +1,19 @@
-When compiler is looking for as header, this directory is searched
-last (after all other paths specified in CFLAGS and standard paths).
-
-Header files located here can be used to handle cases when required
+This directory provides workarounds for certain problems building devchk
+with the native compiler. It is not needed for builds using lsbcc.
+
+When building devchk objects, the compiler searches this directory last,
+after all other paths specified in CFLAGS and the standard paths.
+
+Header files located here can be used to handle cases when some required
 headers are not found at the expected locations (e.g., some headers
-can be renamed in new systems, while LSB still has old names).
+can be renamed in new systems, while LSB still has old names).  
+
+A special case of this is LSB-only headers - a few have been added to
+avoid header loops, usually defining only a single or a small number
+of types.  The resulting test build will not be useful in the native
+case - as the copies here are the LSB header itself, there will be
+no test against the native definition of the type.  Some work should be
+done to improve this situation (in some cases, the corresponding
+native header exists, and is named bits/{something}.h.
+
+

=== added directory 'ts/devchk/missing_headers/lsb'
=== added file 'ts/devchk/missing_headers/lsb/Composite.h'
--- a/ts/devchk/missing_headers/lsb/Composite.h	1970-01-01 00:00:00 +0000
+++ b/ts/devchk/missing_headers/lsb/Composite.h	2013-08-30 14:18:03 +0000
@@ -0,0 +1,19 @@
+#if (__LSB_VERSION__ >= 12 )
+#ifndef _LSB_COMPOSITE_H_
+#define _LSB_COMPOSITE_H_
+
+#include <X11/Intrinsic.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+/* Special header to avoid header inclusion loops */
+    typedef Cardinal(*XtOrderProc) (Widget);
+
+#ifdef __cplusplus
+}
+#endif
+#endif				/* protection */
+#endif				/* LSB version */

=== added file 'ts/devchk/missing_headers/lsb/pthread.h'
--- a/ts/devchk/missing_headers/lsb/pthread.h	1970-01-01 00:00:00 +0000
+++ b/ts/devchk/missing_headers/lsb/pthread.h	2013-08-30 14:18:03 +0000
@@ -0,0 +1,21 @@
+#if (__LSB_VERSION__ >= 10 )
+#ifndef _LSB_PTHREAD_H_
+#define _LSB_PTHREAD_H_
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+/* Special header to avoid header inclusion loops */
+#if __LSB_VERSION__ >= 12
+    typedef unsigned long int pthread_t;
+
+#endif				/* __LSB_VERSION__ >= 1.2 */
+
+#ifdef __cplusplus
+}
+#endif
+#endif				/* protection */
+#endif				/* LSB version */

=== added file 'ts/devchk/missing_headers/lsb/time.h'
--- a/ts/devchk/missing_headers/lsb/time.h	1970-01-01 00:00:00 +0000
+++ b/ts/devchk/missing_headers/lsb/time.h	2013-08-30 14:18:03 +0000
@@ -0,0 +1,25 @@
+#if (__LSB_VERSION__ >= 10 )
+#ifndef _LSB_TIME_H_
+#define _LSB_TIME_H_
+
+#include <sys/types.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+/* Special header to avoid header inclusion loops */
+#if __LSB_VERSION__ >= 12
+    struct timeval {
+	time_t tv_sec;
+	suseconds_t tv_usec;
+    };
+
+#endif				/* __LSB_VERSION__ >= 1.2 */
+
+#ifdef __cplusplus
+}
+#endif
+#endif				/* protection */
+#endif				/* LSB version */

=== added file 'ts/devchk/missing_headers/lsb/types.h'
--- a/ts/devchk/missing_headers/lsb/types.h	1970-01-01 00:00:00 +0000
+++ b/ts/devchk/missing_headers/lsb/types.h	2013-08-30 14:18:03 +0000
@@ -0,0 +1,55 @@
+#if (__LSB_VERSION__ >= 10 )
+#ifndef _LSB_TYPES_H_
+#define _LSB_TYPES_H_
+
+#include <stdint.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+/* Special header to avoid header inclusion loops */
+#if __LSB_VERSION__ >= 20
+#if defined __i386__
+/* IA32 */
+    typedef int32_t ssize_t;
+
+#endif
+#if defined __s390__ && !defined __s390x__
+/* S390 */
+    typedef int32_t ssize_t;
+
+#endif
+#if defined __powerpc__ && !defined __powerpc64__
+/* PPC32 */
+    typedef int32_t ssize_t;
+
+#endif
+#if defined __ia64__
+/* IA64 */
+    typedef int64_t ssize_t;
+
+#endif
+#if defined __powerpc64__
+/* PPC64 */
+    typedef int64_t ssize_t;
+
+#endif
+#if defined __x86_64__
+/* x86-64 */
+    typedef int64_t ssize_t;
+
+#endif
+#if defined __s390x__
+/* S390X */
+    typedef int64_t ssize_t;
+
+#endif
+#endif				/* __LSB_VERSION__ >= 2.0 */
+
+#ifdef __cplusplus
+}
+#endif
+#endif				/* protection */
+#endif				/* LSB version */

=== added file 'ts/devchk/missing_headers/lsb/wchar.h'
--- a/ts/devchk/missing_headers/lsb/wchar.h	1970-01-01 00:00:00 +0000
+++ b/ts/devchk/missing_headers/lsb/wchar.h	2013-08-30 14:18:03 +0000
@@ -0,0 +1,26 @@
+#if (__LSB_VERSION__ >= 10 )
+#ifndef _LSB_WCHAR_H_
+#define _LSB_WCHAR_H_
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+/* Special header to avoid header inclusion loops */
+    typedef unsigned int wint_t;
+
+#if __LSB_VERSION__ >= 12
+    typedef struct {
+	int count;
+	wint_t value;
+    } mbstate_t;
+
+#endif				/* __LSB_VERSION__ >= 1.2 */
+
+#ifdef __cplusplus
+}
+#endif
+#endif				/* protection */
+#endif				/* LSB version */



More information about the lsb-messages mailing list