GNOME Bugzilla – Bug 316529
gnome-vfs should use libtool -export-symbols-regex
Last modified: 2005-11-14 11:12:14 UTC
Attached find a patch that adds the libtool -export-symbols-regex to gnome-vfs. This causes gnome-vfs to not export private symbols that start with an "_" symbol. This technique is used by glib/gtk+/libgnome* libraries. In order to get this to work, I had to make a few minor changes to the private interfaces: + A handful of private interfaces are actually used by the gnome-vfs-daemon, so I renamed these interfaces so they do not start with a "_" and end with the word private. This is a convention followed by other GNOME Platform libraries and is a better way to distinguish these private interfaces as being ones that actually need to be exported but are not for general use. + I added gnome-vfs-filesystem-type.c and gnome-vfs-cdrom as sources linked into the daemon rather than renaming the interfaces as above. I did this because the interfaces defined in these files are self-contained and this allows the daemon access to the interfaces without exposing them. + I changed _gnome_vfs_get_daemon_volume_monitor_type to be an exposed interface. Normally in GNOME libraries the *get_type interfaces are exposed. Furthermore the daemon requires this interfaces. If this type is private, perhaps it should be renamed to "daemon_volume_monitor_private" + In libgnomevfs-gnome-vfs-mime-handlers I changed __FUNCTION__ which is GNU specific to G_GNUC_FUNCTION which is a safer way to specify the same thing so the code compiles even if not using gcc. I hope you find this patch acceptable, but I'm happy to further tweak it if the maintainer has better suggestions of how to support -export-symbols-regex in gnome-vfs.
Created attachment 52328 [details] [review] patch to add -export-symbols-regex support
Marking this as NEW to get a review on the patch.
I commited this. Although i needed an additional fix in modules/file-method.c to make it work. Thanks!