Hi,
At Mon, 12 Jul 1999 00:44:40 +0200,
Petter Reinholdtsen <[EMAIL PROTECTED]> wrote ...
>
> > Can you marge the following code to currect cvs?
>
> I had a look at them, changed some stuff, and will commit your changes
> today. Let me know if more changes are required.
>
> Patches should test for functionality, not operating system names. I
> changed '#ifndef BEOS' to '#ifdef HAVE_SEEKDIR' and '#ifdef
> HAVE_BE_KERNE_IMAGE_H' instead and added check for seekdir in
> configure.
>
> I also had to change the beos test already in configure to check for
> be/kernel/image.h instead of just image.h. Is this correct?
I think that I should change the following...
---------------------------------
diff -urN japhar/configure.in japhar.beos/configure.in
--- japhar/configure.in Mon Jul 12 14:00:21 1999
+++ japhar.beos/configure.in Wed Jul 14 02:47:40 1999
@@ -54,7 +54,7 @@
dnl
AM_WITH_DMALLOC
AC_FUNC_ALLOCA
-AC_CHECK_FUNCS(sleep mmap select snprintf vsnprintf seekdir)
+AC_CHECK_FUNCS(sleep mmap select snprintf vsnprintf seekdir telldir)
AC_REPLACE_FUNCS(fmodf scandir alphasort strerror)
dnl
@@ -472,7 +472,7 @@
AC_CHECK_FUNCS(shl_load shl_unload shl_findsym)
# BeOS has load_add_on in be/kernel/image.h
-AC_CHECK_FUNCS(load_add_on)
+AC_CHECK_FUNCS(load_add_on unload_add_on get_image_symbol)
#
# check for struct sockaddr_in.sin_len
diff -urN japhar/arch/scandir.c japhar.beos/arch/scandir.c
--- japhar/arch/scandir.c Mon Jul 12 14:00:27 1999
+++ japhar.beos/arch/scandir.c Wed Jul 14 02:37:30 1999
@@ -129,13 +129,15 @@
if (NULL == d)
return -1;
+#if defined(HAVE_SEEKDIR) && defined(HAVE_TELLDIR)
start = telldir(d);
+#endif
while (NULL != readdir(d)) count++;
names = malloc(sizeof(struct dirent *) * count);
-#ifdef HAVE_SEEKDIR
+#if defined(HAVE_SEEKDIR) && defined(HAVE_TELLDIR)
seekdir(d, start);
#else
/* BeOS don't have seekdir() function */
------------------------------------
----------
Makoto Kato
mailto:[EMAIL PROTECTED] ICQ No.14395562
http://hp.vector.co.jp/authors/VA008030/