Re: [Nautilus-list] nautilus on solaris 2.6 ?
- From: Seth Nickell <seth eazel com>
- To: "Jean-Raymond.Chauviere" <Jean-Raymond Chauviere cetelem fr>, nautilus-list lists eazel com
- Subject: Re: [Nautilus-list] nautilus on solaris 2.6 ?
- Date: Thu, 14 Sep 2000 02:45:20 -0700
> Just to know if someone succeed to compile nautilus
> on solaris 2.6 (gcc 2.95)
> I workaround for many errors but
> I have problem with mnttab and mnttent in medusa.
> It seems that this product is windowish written-only for linux.
I am currently wrapping the process of making Nautilus work correctly on
Solaris. It is extremely portable given that it took me a week of work
to do the porting from a codebase that's been developed almost
exclusively on RedHat Linux 6.2. I have recently committed my fixes for
Nautilus into CVS, so Nautilus itself should be fairly painless.
Attached is a rough version of my patch for medusa. A few things still
need to be revised, but it should at least work well enough to compile
:-)
Note that I have been using gcc 2.72 on Solaris 7, so some minor
differences may result. I'd be very interested in reports of your
success.
-Seth
Index: configure.in
===================================================================
RCS file: /cvs/gnome/medusa/configure.in,v
retrieving revision 1.26
diff -u -p -r1.26 configure.in
--- configure.in 2000/08/25 00:52:30 1.26
+++ configure.in 2000/09/14 07:39:04
@@ -34,8 +34,11 @@ AC_PROG_MAKE_SET
AC_ISC_POSIX
dnl Checks for fucntions
-AC_CHECK_FUNCS(getmntinfo getmntent)
+AC_CHECK_FUNCS(getmntinfo getmntent setmntent endmntent)
+dnl Checks for headers
+AC_CHECK_HEADERS(sys/mnttab.h)
+
dnl Prefix so medusa can find its installed files
if test "x$prefix" = "xNONE"; then
medusa_prefix=${ac_default_prefix}
@@ -99,9 +102,7 @@ if test "$GCC" = "yes" -a "$set_more_war
CFLAGS="$CFLAGS \
-Wall -Wno-uninitialized \
-Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes \
- -Wnested-externs -Wpointer-arith \
- -Wno-sign-compare -Wsign-promo \
- -Werror"
+ -Wnested-externs -Wpointer-arith "
fi
AC_OUTPUT([
Index: indexer/medusa-file-index-daemon.c
===================================================================
RCS file: /cvs/gnome/medusa/indexer/medusa-file-index-daemon.c,v
retrieving revision 1.42
diff -u -p -r1.42 medusa-file-index-daemon.c
--- indexer/medusa-file-index-daemon.c 2000/09/02 01:59:27 1.42
+++ indexer/medusa-file-index-daemon.c 2000/09/14 07:39:04
@@ -46,6 +46,20 @@
#include <libmedusa/medusa-index-service.h>
#include <libmedusa/medusa-index-service-private.h>
+#ifndef AF_LOCAL
+#define AF_LOCAL AF_UNIX
+#endif
+
+#ifndef NAME_MAX
+#define NAME_MAX 512
+#endif
+
+#ifndef SUN_LEN
+/* This system is not POSIX.1g. */
+#define SUN_LEN(ptr) ((size_t) (((struct sockaddr_un *) 0)->sun_path) \
+ + strlen ((ptr)->sun_path))
+#endif
+
/* Creates a totally new file index, and writes it over the old one */
static void do_full_indexing (char *root_directory);
Index: libmedusa/medusa-search-service.h
===================================================================
RCS file: /cvs/gnome/medusa/libmedusa/medusa-search-service.h,v
retrieving revision 1.10
diff -u -p -r1.10 medusa-search-service.h
--- libmedusa/medusa-search-service.h 2000/08/26 00:44:23 1.10
+++ libmedusa/medusa-search-service.h 2000/09/14 07:39:04
@@ -33,6 +33,20 @@
#include <libgnomevfs/gnome-vfs-types.h>
+#ifndef AF_LOCAL
+#define AF_LOCAL AF_UNIX
+#endif
+
+#ifndef NAME_MAX
+#define NAME_MAX 512
+#endif
+
+#ifndef SUN_LEN
+/* This system is not POSIX.1g. */
+#define SUN_LEN(ptr) ((size_t) (((struct sockaddr_un *) 0)->sun_path) \
+ + strlen ((ptr)->sun_path))
+#endif
+
/* FIXME: Is anyone using this type? */
typedef struct MedusaSearchHandle MedusaSearchHandle;
Index: libmedusa/medusa-service-private.c
===================================================================
RCS file: /cvs/gnome/medusa/libmedusa/medusa-service-private.c,v
retrieving revision 1.1
diff -u -p -r1.1 medusa-service-private.c
--- libmedusa/medusa-service-private.c 2000/08/17 00:51:31 1.1
+++ libmedusa/medusa-service-private.c 2000/09/14 07:39:04
@@ -1,4 +1,4 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*- */
+
/*
* Medusa
Index: libmedusa/medusa-service-private.h
===================================================================
RCS file: /cvs/gnome/medusa/libmedusa/medusa-service-private.h,v
retrieving revision 1.1
diff -u -p -r1.1 medusa-service-private.h
--- libmedusa/medusa-service-private.h 2000/08/17 00:51:31 1.1
+++ libmedusa/medusa-service-private.h 2000/09/14 07:39:04
@@ -26,6 +26,16 @@
#ifndef MEDUSA_SERVICE_PRIVATE_H
#define MEDUSA_SERVICE_PRIVATE_H
+#ifndef AF_LOCAL
+#define AF_LOCAL AF_UNIX
+#endif
+
+#ifndef SUN_LEN
+/* This system is not POSIX.1g. */
+#define SUN_LEN(ptr) ((size_t) (((struct sockaddr_un *) 0)->sun_path) \
+ + strlen ((ptr)->sun_path))
+#endif
+
int medusa_initialize_socket_for_requests (char *socket_path);
Index: libmedusa/medusa-utils.c
===================================================================
RCS file: /cvs/gnome/medusa/libmedusa/medusa-utils.c,v
retrieving revision 1.13
diff -u -p -r1.13 medusa-utils.c
--- libmedusa/medusa-utils.c 2000/09/01 22:53:02 1.13
+++ libmedusa/medusa-utils.c 2000/09/14 07:39:04
@@ -45,7 +45,13 @@
# include <sys/ucred.h>
# include <sys/mount.h>
#elif defined(HAVE_GETMNTENT)
-# include <mntent.h>
+
+#if HAVE_SYS_MNTTAB_H
+#include <sys/mnttab.h>
+#else
+#include <mntent.h>
+#endif
+
#endif
#define STOPLIST_FILE_NAME MEDUSA_PREFIX "/share/medusa/" "file-index-stoplist"
@@ -572,11 +578,29 @@ medusa_nfs_mount_list_initialize (void)
}
#elif defined (HAVE_GETMNTENT)
FILE *mount_file;
+
+#if HAVE_SYS_MNTTAB_H
+ struct mnttab *mount_entry_mnttab;
+#else
struct mntent *mount_entry;
+#endif
mounted_directory_list = NULL;
-
+#if HAVE_SETMNTENT
mount_file = setmntent (MOUNTED, "r");
+#else
+ mount_file = fopen ("/etc/mnttab", "r");
+#endif
+
+#if HAVE_SYS_MNTTAB_H
+ while ((getmntent (mount_file, mount_entry_mnttab) != 0)) {
+ if (strcmp (mount_entry_mnttab->mnt_fstype, "nfs") == 0) {
+ mounted_directory_list = g_list_prepend
+ (mounted_directory_list,
+ gnome_vfs_get_uri_from_local_path (mount_entry_mnttab->mnt_mountp));
+ }
+ }
+#else /* !HAVE_SYS_MNTTAB */
while ((mount_entry = getmntent (mount_file)) != NULL) {
if (strcmp (mount_entry->mnt_type, "nfs") == 0) {
mounted_directory_list = g_list_prepend
@@ -584,7 +608,14 @@ medusa_nfs_mount_list_initialize (void)
gnome_vfs_get_uri_from_local_path (mount_entry->mnt_dir));
}
}
+#endif /*HAVE_SYS_MNTTAB*/
+
+#if HAVE_ENDMNTENT
endmntent (mount_file);
+#else
+ fclose (mount_file);
+#endif
+
#else
/* FIXME: Shouldn't we catch this at configure time instead of
* just spewing a warning at compile time?
Index: libmedusa/medusa-utils.h
===================================================================
RCS file: /cvs/gnome/medusa/libmedusa/medusa-utils.h,v
retrieving revision 1.13
diff -u -p -r1.13 medusa-utils.h
--- libmedusa/medusa-utils.h 2000/09/01 22:53:02 1.13
+++ libmedusa/medusa-utils.h 2000/09/14 07:39:04
@@ -29,6 +29,10 @@
#include <libgnomevfs/gnome-vfs-types.h>
+#ifndef NAME_MAX
+#define NAME_MAX 512
+#endif
+
/* This constant is needed to index metadata. */
#define MEDUSA_PUBLIC_METAFILE_NAME ".nautilus-metafile.xml"
#define MEDUSA_PRIVATE_METAFILE_DIRECTORY_PATH "/.nautilus/metafiles/"
Index: libmedusa-internal/medusa-file-index-encoders.h
===================================================================
RCS file: /cvs/gnome/medusa/libmedusa-internal/medusa-file-index-encoders.h,v
retrieving revision 1.7
diff -u -p -r1.7 medusa-file-index-encoders.h
--- libmedusa-internal/medusa-file-index-encoders.h 2000/08/29 00:36:46 1.7
+++ libmedusa-internal/medusa-file-index-encoders.h 2000/09/14 07:39:04
@@ -30,6 +30,10 @@
#include <medusa-file-index.h>
+#ifndef NAME_MAX
+#define NAME_MAX 512
+#endif
+
void medusa_file_database_uri_number_encode (char *result,
int *uri_number,
MedusaFileSystemDB *file_system_db);
Index: libmedusa-internal/medusa-rdb-query.h
===================================================================
RCS file: /cvs/gnome/medusa/libmedusa-internal/medusa-rdb-query.h,v
retrieving revision 1.12
diff -u -p -r1.12 medusa-rdb-query.h
--- libmedusa-internal/medusa-rdb-query.h 2000/08/31 19:20:57 1.12
+++ libmedusa-internal/medusa-rdb-query.h 2000/09/14 07:39:04
@@ -31,6 +31,10 @@
#include <glib.h>
#include "medusa-rdb-fields.h"
+#ifndef NAME_MAX
+#define NAME_MAX 512
+#endif
+
typedef GSList MedusaRDBOperators;
typedef struct MedusaRDBQueryCriterion MedusaRDBQueryCriterion;
typedef GSList MedusaRDBQuery;
Index: search-service/medusa-file-search-daemon.c
===================================================================
RCS file: /cvs/gnome/medusa/search-service/medusa-file-search-daemon.c,v
retrieving revision 1.32
diff -u -p -r1.32 medusa-file-search-daemon.c
--- search-service/medusa-file-search-daemon.c 2000/08/31 02:29:17 1.32
+++ search-service/medusa-file-search-daemon.c 2000/09/14 07:39:04
@@ -47,6 +47,19 @@
#include "medusa-authenticate.h"
#include "medusa-file-search-parse-transmission.h"
+#ifndef AF_LOCAL
+#define AF_LOCAL AF_UNIX
+#endif
+
+#ifndef NAME_MAX
+#define NAME_MAX 512
+#endif
+
+#ifndef SUN_LEN
+/* This system is not POSIX.1g. */
+#define SUN_LEN(ptr) ((size_t) (((struct sockaddr_un *) 0)->sun_path) \
+ + strlen ((ptr)->sun_path))
+#endif
static MedusaMasterDB *master_db;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]