> On Thursday 09 October 2008 04:30:38 François Revol wrote:
> > Hi,
> > didn't try building for a while...
> > Here are some fixes.
> > - using function returned address with array subscript doesn't seem
> > to
> > be C89
>
> I'm pretty sure it is:
> http://opengroup.org/onlinepubs/007908775/xsh/strncpy.html
> http://books.google.com/books?id=rHyMRyDEG3gC&pg=PA454&lpg=PA454&source=web&ots=vHojjnHS8H&sig=fh_grVvNg4y7_Rdun1JdXkCWohg&hl=en&sa=X&oi=book_result&resnum=34&ct=result
> =book_result&resnum=34&ct=result>
> =book_result&resnum=34&ct=result>

I've checked the man for strncpy, that's not the issue.

gcc2.95 says:

/work/oss/build/kernel/framework/audio/oss_audio_core.c: In function
`oss_audio_open_engine':
/work/oss/build/kernel/framework/audio/oss_audio_core.c:1434:
subscripted value is neither array nor pointer
/work/oss/build/kernel/framework/audio/oss_audio_core.c:1435:
subscripted value is neither array nor pointer

Oh wait, could it be it misses the header declaring strncpy() ?
It'd then default to returning int... but it doesn't warn about it,
odd...

Actually yes, adding #include <string.h> to os_beos.h fixed it.
Indeed I recall using this syntax elsewhere, so... I'm too used to
having to fix C89 it seems.

Attached diff replaces both.

François.

diff -r d79ebde9987e kernel/OS/BeOS/os_beos.h
--- a/kernel/OS/BeOS/os_beos.h  Tue Oct 07 17:50:26 2008 +0300
+++ b/kernel/OS/BeOS/os_beos.h  Thu Oct 09 10:23:49 2008 +0200
@@ -51,6 +51,7 @@
 #include <OS.h>
 #include <stdarg.h>
 //#include <stdint.h>
+#include <string.h>
 #include <inttypes.h>
 #include <sys/types.h>
 #include <sys/param.h>
diff -r d79ebde9987e setup/BeOS/make.local
--- a/setup/BeOS/make.local     Tue Oct 07 17:50:26 2008 +0300
+++ b/setup/BeOS/make.local     Thu Oct 09 10:23:49 2008 +0200
@@ -5,6 +5,6 @@
        cp -R prototype/* /
 
 package:       build
-               cd setup/BeOS && sh mkpkg.sh
+               sh setup/BeOS/mkpkg.sh
 
 install:       copy
diff -r d79ebde9987e setup/BeOS/mkpkg.sh
--- a/setup/BeOS/mkpkg.sh       Tue Oct 07 17:50:26 2008 +0300
+++ b/setup/BeOS/mkpkg.sh       Thu Oct 09 10:23:49 2008 +0200
@@ -6,7 +6,7 @@
 PKGNAME=$OSSNAME-$VERSION-$RELEASE
 
 echo building $PKGNAME.zip
-(cd prototype; zip -ry9 ../$PKGNAME.zip)
+(cd prototype; zip -ry9 ../$PKGNAME.zip *)
 
 #if test -f 4front-private/export_package.sh
 #then
_______________________________________________
oss-devel mailing list
oss-devel@mailman.opensound.com
http://mailman.opensound.com/mailman/listinfo/oss-devel

Reply via email to