Bug#300917: dietlibc-dev: sys/types.h: test for __powerpc__, not powerpc

2005-03-25 Thread Gerrit Pape
On Tue, Mar 22, 2005 at 06:57:48PM +0200, Lars Wirzenius wrote:
 In sys/types.h, at around line 70, there is this test:
 
 #elif defined(powerpc)
 
 If gcc is used in C99 conformance mode, the symbol powerpc doesn't exist,
 but __powerpc__ exists, and it seems to exist in all modes. I suggest
 changing the test to test __powerpc__ therefore.
 
 There may be other instances of the powerpc symbol being tested for,
 so a recursive grep for it might be a good thing.

Yes, this already is fixed in upstream CVS.  Thanks, Gerrit.
  #ifdef powerpc - #ifdef __powerpc__ (Enrico Scholz)

Index: diet.c
===
RCS file: /cvs/dietlibc/diet.c,v
retrieving revision 1.60
retrieving revision 1.61
diff -u -r1.60 -r1.61
--- diet.c  17 Dec 2004 18:47:58 -  1.60
+++ diet.c  7 Mar 2005 09:07:40 -   1.61
@@ -137,7 +137,7 @@
   shortplatform=sparc;
 #endif
 #endif
-#ifdef powerpc
+#ifdef __powerpc__
   shortplatform=ppc;
 #endif
 #ifdef __powerpc64__
Index: syscalls.h
===
RCS file: /cvs/dietlibc/syscalls.h,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- syscalls.h  10 Oct 2003 13:37:34 -  1.12
+++ syscalls.h  7 Mar 2005 09:07:40 -   1.13
@@ -11,7 +11,7 @@
 #include sparc/syscalls.h
 #endif
 
-#elif defined(powerpc)
+#elif defined(__powerpc__)
 #include ppc/syscalls.h
 
 #elif defined(__powerpc64__)
Index: include/fcntl.h
===
RCS file: /cvs/dietlibc/include/fcntl.h,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -r1.14 -r1.15
--- include/fcntl.h 3 Jan 2004 02:10:02 -   1.14
+++ include/fcntl.h 7 Mar 2005 09:07:40 -   1.15
@@ -322,7 +322,7 @@
 };
 #endif
 
-#elif defined(powerpc) || defined(__powerpc64__)
+#elif defined(__powerpc__) || defined(__powerpc64__)
 
 /* open/fcntl - O_SYNC is only implemented on blocks devices and on files
located on an ext2 file system */
Index: include/setjmp.h
===
RCS file: /cvs/dietlibc/include/setjmp.h,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -r1.22 -r1.23
--- include/setjmp.h10 Oct 2003 13:37:34 -  1.22
+++ include/setjmp.h7 Mar 2005 09:07:40 -   1.23
@@ -170,7 +170,7 @@
 #endif
 #endif
 
-#if defined(powerpc) || defined(__powerpc64__)
+#if defined(__powerpc__) || defined(__powerpc64__)
 # define JB_GPR1   0  /* Also known as the stack pointer */
 # define JB_GPR2   1
 # define JB_LR 2  /* The address we will return to */
Index: include/signal.h
===
RCS file: /cvs/dietlibc/include/signal.h,v
retrieving revision 1.48
retrieving revision 1.49
diff -u -r1.48 -r1.49
--- include/signal.h17 Dec 2004 19:14:49 -  1.48
+++ include/signal.h7 Mar 2005 09:07:40 -   1.49
@@ -31,7 +31,7 @@
 #define SIGALRM14
 #define SIGTERM15
 #define SIGUNUSED  31
-#if defined(__i386__) || defined(__x86_64__) || defined(powerpc) || 
defined(__arm__) \
+#if defined(__i386__) || defined(__x86_64__) || defined(__powerpc__) || 
defined(__arm__) \
|| defined(__s390__) || defined(__ia64__) || defined(__powerpc64__)
 #define SIGBUS  7
 #define SIGUSR110
Index: include/stdarg-cruft.h
===
RCS file: /cvs/dietlibc/include/stdarg-cruft.h,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- include/stdarg-cruft.h  10 Oct 2003 13:37:34 -  1.6
+++ include/stdarg-cruft.h  7 Mar 2005 09:07:40 -   1.7
@@ -109,7 +109,7 @@
 #endif
 #endif
 
-#elif defined(powerpc)
+#elif defined(__powerpc__)
 
 typedef struct __va_list_tag {
   unsigned char gpr;   /* index into the array of 8 GPRs stored in the
@@ -275,7 +275,7 @@
   == __real_type_class)  (__va).__offset = (6 * 8)) \
 ? (6 * 8) + 8 : __va_tsize (__type)
 
-#else  /* !__sparc__  !powerpc  !__mips__  !__alpha__*/
+#else  /* !__sparc__  !__powerpc__  !__mips__  !__alpha__*/
 
 typedef char* va_list;
 
Index: include/termios.h
===
RCS file: /cvs/dietlibc/include/termios.h,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -r1.16 -r1.17
--- include/termios.h   3 Aug 2004 22:28:46 -   1.16
+++ include/termios.h   7 Mar 2005 09:07:40 -   1.17
@@ -103,7 +103,7 @@
cc_t c_line;/* line discipline */
cc_t c_cc[NCCS];/* control characters */
 };
-#elif defined(powerpc) || defined(__powerpc64__) || defined(__alpha__)
+#elif defined(__powerpc__) || defined(__powerpc64__) || defined(__alpha__)
 #define NCCS   19
 struct termios {
tcflag_t c_iflag; 

Bug#300917: dietlibc-dev: sys/types.h: test for __powerpc__, not powerpc

2005-03-22 Thread Lars Wirzenius
Package: dietlibc-dev
Version: 0.28-1
Severity: normal
File: /usr/include/diet/sys/types.h

In sys/types.h, at around line 70, there is this test:

#elif defined(powerpc)

If gcc is used in C99 conformance mode, the symbol powerpc doesn't exist,
but __powerpc__ exists, and it seems to exist in all modes. I suggest
changing the test to test __powerpc__ therefore.

There may be other instances of the powerpc symbol being tested for,
so a recursive grep for it might be a good thing.

-- System Information:
Debian Release: 3.1
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: i386 (i686)
Kernel: Linux 2.6.10-1-686
Locale: LANG=fi_FI.UTF-8, LC_CTYPE=fi_FI.UTF-8 (charmap=UTF-8)

-- no debconf information


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]