Re: [PATCH] Add BeOS



"David Reid" <dreid jetnet co uk> writes:

> This is step 1 in adding BeOS.  There is a new file (gthread-beos.c) that
> isn't with this patch and I have small patches for gtimer.c and gspawn.c
> that add header files that are needed.

I'd prefer if you sent the complete changes.
 
> Please let me know of any problems and I will try to correct them.
> 
> david
> 
> Index: configure.in
> ===================================================================
> RCS file: /cvs/gnome/glib/configure.in,v
> retrieving revision 1.159
> diff -u -r1.159 configure.in
> --- configure.in	2000/11/15 17:48:42	1.159
> +++ configure.in	2000/11/27 21:27:03
> @@ -424,10 +424,18 @@
>          AC_DEFINE(HAVE_SYS_SELECT_H,1,[found fd_set in sys/select.h])
>          AC_MSG_RESULT([yes, found in sys/select.h])
>      else
> -	AC_DEFINE(NO_FD_SET,1,[didn't find fd_set])
> -	AC_MSG_RESULT(no)
> +        AC_HEADER_EGREP(fd_set, sys/socket.h, gtk_ok=yes)
> +        if test $gtk_ok = yes; then
> +            # This is for BeOS
> +            AC_DEFINE(HAVE_SYS_SOCKET_H,1,[found fd_set in sys/socket.h])

This should be something like HAVE_FD_SET_IN_SYS_SOCKET; most systems
do have sys/socket.h

> +            AC_MSG_RESULT([yes, found in sys/socket.h])
> +        else
> +            AC_DEFINE(NO_FD_SET,1,[didn't find fd_set])
> +            AC_MSG_RESULT(no)
> +        fi
>      fi
>  fi
> +AC_SEARCH_LIBS(select, socket bind)

Using the default action (which , I think, is adding the library
to $LIBS) here can't be right. You need to put the variable in
some specific substituted variable.
  
>  dnl *** check for sane realloc() ***
>  AC_CACHE_CHECK([whether realloc (NULL,) will work],glib_cv_sane_realloc,[
> @@ -571,9 +579,9 @@
>  dnl *** load_image (BeOS)
>  if test -z "$G_MODULE_IMPL" -a "x$glib_native_beos" = "xyes"; then
>    AC_CHECK_LIB(root, load_image,
> -      [G_MODULE_LIBS="-lbe -lroot -lglib"
> +      [G_MODULE_LIBS="-lbe -lroot"
>        G_MODULE_LIBS_EXTRA="-L\$(top_builddir_full)/.libs"
> -      G_MODULE_PLUGIN_LIBS="-L\$(top_builddir_full)/gmodule/.libs -lgmodule"
> +      G_MODULE_PLUGIN_LIBS="-L\$(top_builddir_full)/gmodule/.libs -lgmodule-1.3"
>        G_MODULE_IMPL=G_MODULE_IMPL_BEOS],
>        [])
>  fi   
> @@ -654,6 +662,13 @@
>  if test -z "$G_MODULE_IMPL"; then
>  	G_MODULE_IMPL=0
>  fi
> +
> +case $host in
> +    *-*-beos*)
> +        OBJECT_LIBADD="-L../.libs -lglib-1.3"
> +        ;;
> +esac

Why do you need this? It basically can't be right to have the .libs
here. If linking against the uninstalled library is mandatory,
as it is in AIX, I think there are provisions at least in CVS
libtool to handle this.

> Index: gmain.c
> ===================================================================
> RCS file: /cvs/gnome/glib/gmain.c,v
> retrieving revision 1.42
> diff -u -r1.42 gmain.c
> --- gmain.c	2000/09/29 13:37:00	1.42
> +++ gmain.c	2000/11/27 21:27:05
> @@ -36,6 +36,13 @@
>  /* uncomment the next line to get poll() debugging info */
>  /* #define G_MAIN_POLL_DEBUG */
>  
> +#ifdef HAVE_SYS_SOCKET_H
> +/* we include this here as it includes a file that defines MIN & MAX,
> + * so as we redefine them in gmacros.h this stops a warning...
> + */
> +#include <sys/socket.h>
> +#endif /* HAVE_SYS_SOCKET_H */

I'm not sure the comment is needed - this is a fairly common
problem, so most GLib/GTK+ files should be, if they aren't:

 #include [system headers]

 #include [g headers]





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]