Bug#323739: FTBFS: Invalid lvalues used in increments

2005-09-12 Thread Matej Vela
Hi,

I've done an NMU; patch attached.

Thanks,

Matej
diff -u mit-scheme-7.7.90/debian/changelog mit-scheme-7.7.90/debian/changelog
--- mit-scheme-7.7.90/debian/changelog
+++ mit-scheme-7.7.90/debian/changelog
@@ -1,3 +1,15 @@
+mit-scheme (7.7.90-5.1) unstable; urgency=low
+
+  * NMU during BSP.
+  * Fix build failure with gcc 4.0.  Closes: #323739.
+- src/microcode/obstack.h: Casts can no longer be combined with `++'
+  (backported from the current glibc version).
+- src/microcode/uxio.c: Include string.h for strlen.
+  * doc/*/Makefile.in: texi2html now creates a subdirectory by default;
+invoke it with `--output=.'.
+
+ -- Matej Vela [EMAIL PROTECTED]  Mon, 12 Sep 2005 10:13:58 +0200
+
 mit-scheme (7.7.90-5) unstable; urgency=low
 
   * Add libx11-dev to build-depends.  (closes: Bug#290845)
only in patch2:
unchanged:
--- mit-scheme-7.7.90.orig/src/microcode/obstack.h
+++ mit-scheme-7.7.90/src/microcode/obstack.h
@@ -280,19 +280,24 @@
 #define obstack_ptr_grow(OBSTACK,datum)
\
 ({ struct obstack *__o = (OBSTACK);\
((__o-next_free + sizeof (void *)  __o-chunk_limit)  \
-? _obstack_newchunk (__o, sizeof (void *)) : 0),   \
-   *((void **)__o-next_free)++ = ((void *)datum); \
+? _obstack_newchunk (__o, sizeof (void *)) : 0);   \
+   *(const void **) __o-next_free = (datum);  \
+   __o-next_free += sizeof (const void *);\
(void) 0; })
 
 #define obstack_int_grow(OBSTACK,datum)
\
 ({ struct obstack *__o = (OBSTACK);\
((__o-next_free + sizeof (int)  __o-chunk_limit) \
-? _obstack_newchunk (__o, sizeof (int)) : 0),  \
-   *((int *)__o-next_free)++ = ((int)datum);  \
+? _obstack_newchunk (__o, sizeof (int)) : 0);  \
+   *(int *) __o-next_free = (datum);  \
+   __o-next_free += sizeof (int); \
(void) 0; })
 
-#define obstack_ptr_grow_fast(h,aptr) (*((void **)(h)-next_free)++ = (void 
*)aptr)
-#define obstack_int_grow_fast(h,aint) (*((int *)(h)-next_free)++ = (int)aint)
+#define obstack_ptr_grow_fast(h,aptr)  \
+  (((const void **) ((h)-next_free += sizeof (void *)))[-1] = (aptr))
+
+#define obstack_int_grow_fast(h,aint)  \
+  (((int *) ((h)-next_free += sizeof (int)))[-1] = (aint))
 
 #define obstack_blank(OBSTACK,length)  \
 ({ struct obstack *__o = (OBSTACK);\
@@ -374,8 +379,11 @@
? (_obstack_newchunk ((h), sizeof (int)), 0) : 0),  \
   *((int *)(((h)-next_free+=sizeof(int))-sizeof(int))) = ((int)datum))
 
-#define obstack_ptr_grow_fast(h,aptr) (*((char **)(h)-next_free)++ = (char 
*)aptr)
-#define obstack_int_grow_fast(h,aint) (*((int *)(h)-next_free)++ = (int)aint)
+#define obstack_ptr_grow_fast(h,aptr)  \
+  (((const void **) ((h)-next_free += sizeof (void *)))[-1] = (aptr))
+
+#define obstack_int_grow_fast(h,aint)  \
+  (((int *) ((h)-next_free += sizeof (int)))[-1] = (aint))
 
 #define obstack_blank(h,length)
\
 ( (h)-temp = (length),
\
only in patch2:
unchanged:
--- mit-scheme-7.7.90.orig/src/microcode/uxio.c
+++ mit-scheme-7.7.90/src/microcode/uxio.c
@@ -240,7 +240,7 @@
   return ((scr  0) ? 0 : scr);
 }
 
-#ifdef _POSIX
+#ifdef __STDC__
 #include string.h
 #else
 extern int EXFUN (strlen, (CONST char *));
only in patch2:
unchanged:
--- mit-scheme-7.7.90.orig/doc/imail/Makefile.in
+++ mit-scheme-7.7.90/doc/imail/Makefile.in
@@ -73,7 +73,7 @@
 
 imail.html: imail.texinfo gfdl.texinfo
rm -f imail*.html
-   texi2html -split_chapter imail.texinfo
+   texi2html --split=chapter --output=. imail.texinfo
 
 imail.pdf: imail.texinfo gfdl.texinfo
texi2pdf imail.texinfo
only in patch2:
unchanged:
--- mit-scheme-7.7.90.orig/doc/ref-manual/Makefile.in
+++ mit-scheme-7.7.90/doc/ref-manual/Makefile.in
@@ -95,7 +95,7 @@
 
 scheme.html: $(SOURCES)
rm -f scheme*.html
-   texi2html -split_chapter scheme.texinfo
+   texi2html --split=chapter --output=. scheme.texinfo
 
 scheme.pdf: $(SOURCES)
texi2pdf scheme.texinfo
only in patch2:
unchanged:
--- mit-scheme-7.7.90.orig/doc/sos/Makefile.in
+++ mit-scheme-7.7.90/doc/sos/Makefile.in
@@ -73,7 +73,7 @@
 
 sos.html: sos.texinfo gfdl.texinfo
rm -f sos*.html
-   texi2html -split_chapter sos.texinfo
+   texi2html --split=chapter --output=. sos.texinfo
 
 sos.pdf: sos.texinfo gfdl.texinfo
texi2pdf sos.texinfo
only in patch2:
unchanged:
--- 

Bug#323739: FTBFS: Invalid lvalues used in increments

2005-09-08 Thread Matej Vela
tag 323739 patch
thanks

The attached patch allows mit-scheme to build with gcc 4.0.  Fixes to
obstack.h were backported from the current glibc version.

Thanks,

Matej
diff -ruN -x TAGS -x '*.html' -x 'config.*' 
mit-scheme-7.7.90/src/microcode/obstack.h 
mit-scheme-7.7.90.mv/src/microcode/obstack.h
--- mit-scheme-7.7.90/src/microcode/obstack.h   2002-11-26 06:32:30.0 
+0100
+++ mit-scheme-7.7.90.mv/src/microcode/obstack.h2005-09-08 
21:01:59.0 +0200
@@ -280,19 +280,24 @@
 #define obstack_ptr_grow(OBSTACK,datum)
\
 ({ struct obstack *__o = (OBSTACK);\
((__o-next_free + sizeof (void *)  __o-chunk_limit)  \
-? _obstack_newchunk (__o, sizeof (void *)) : 0),   \
-   *((void **)__o-next_free)++ = ((void *)datum); \
+? _obstack_newchunk (__o, sizeof (void *)) : 0);   \
+   *(const void **) __o-next_free = (datum);  \
+   __o-next_free += sizeof (const void *);\
(void) 0; })
 
 #define obstack_int_grow(OBSTACK,datum)
\
 ({ struct obstack *__o = (OBSTACK);\
((__o-next_free + sizeof (int)  __o-chunk_limit) \
-? _obstack_newchunk (__o, sizeof (int)) : 0),  \
-   *((int *)__o-next_free)++ = ((int)datum);  \
+? _obstack_newchunk (__o, sizeof (int)) : 0);  \
+   *(int *) __o-next_free = (datum);  \
+   __o-next_free += sizeof (int); \
(void) 0; })
 
-#define obstack_ptr_grow_fast(h,aptr) (*((void **)(h)-next_free)++ = (void 
*)aptr)
-#define obstack_int_grow_fast(h,aint) (*((int *)(h)-next_free)++ = (int)aint)
+#define obstack_ptr_grow_fast(h,aptr)  \
+  (((const void **) ((h)-next_free += sizeof (void *)))[-1] = (aptr))
+
+#define obstack_int_grow_fast(h,aint)  \
+  (((int *) ((h)-next_free += sizeof (int)))[-1] = (aint))
 
 #define obstack_blank(OBSTACK,length)  \
 ({ struct obstack *__o = (OBSTACK);\
@@ -374,8 +379,11 @@
? (_obstack_newchunk ((h), sizeof (int)), 0) : 0),  \
   *((int *)(((h)-next_free+=sizeof(int))-sizeof(int))) = ((int)datum))
 
-#define obstack_ptr_grow_fast(h,aptr) (*((char **)(h)-next_free)++ = (char 
*)aptr)
-#define obstack_int_grow_fast(h,aint) (*((int *)(h)-next_free)++ = (int)aint)
+#define obstack_ptr_grow_fast(h,aptr)  \
+  (((const void **) ((h)-next_free += sizeof (void *)))[-1] = (aptr))
+
+#define obstack_int_grow_fast(h,aint)  \
+  (((int *) ((h)-next_free += sizeof (int)))[-1] = (aint))
 
 #define obstack_blank(h,length)
\
 ( (h)-temp = (length),
\
diff -ruN -x TAGS -x '*.html' -x 'config.*' 
mit-scheme-7.7.90/src/microcode/uxio.c mit-scheme-7.7.90.mv/src/microcode/uxio.c
--- mit-scheme-7.7.90/src/microcode/uxio.c  2003-03-25 02:09:20.0 
+0100
+++ mit-scheme-7.7.90.mv/src/microcode/uxio.c   2005-09-08 21:04:59.0 
+0200
@@ -240,7 +240,7 @@
   return ((scr  0) ? 0 : scr);
 }
 
-#ifdef _POSIX
+#ifdef __STDC__
 #include string.h
 #else
 extern int EXFUN (strlen, (CONST char *));


Bug#323739: FTBFS: Invalid lvalues used in increments

2005-08-18 Thread Matt Kraai
Package: mit-scheme
Version: 7.7.90-5
Severity: serious

mit-scheme fails to build because invalid lvalues are used in
increments:

 gcc -DMIT_SCHEME -DDEFAULT_LIBRARY_PATH=\/usr/lib/mit-scheme\ 
 -DHAVE_CONFIG_H -I. -I. -I.  -O2 -g -Wall  -c option.c
 option.c: In function 'parse_path_string':
 option.c:830: error: invalid lvalue in increment
 option.c:830: warning: value computed is not used
 option.c:852: error: invalid lvalue in increment
 option.c:852: warning: value computed is not used
 option.c:859: error: invalid lvalue in increment
 option.c:859: warning: value computed is not used

-- 
Matt


signature.asc
Description: Digital signature