aboutsummaryrefslogtreecommitdiff
path: root/libdiskfs
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2020-03-31 20:19:47 +0000
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2020-03-31 20:19:47 +0000
commitf9cb35bcb40fd9a2a553469242189871fd558f87 (patch)
tree477b8b8fa7fd344652a088ec7a5cb9a83c2c85e3 /libdiskfs
parent23193fd35c9eaf20d794a7cc231f7c2a931a6378 (diff)
downloadhurd-f9cb35bcb40fd9a2a553469242189871fd558f87.tar.gz
hurd-f9cb35bcb40fd9a2a553469242189871fd558f87.tar.bz2
hurd-f9cb35bcb40fd9a2a553469242189871fd558f87.zip
Fix build with -fno-common
which will be the default in gcc-10. * acpi/acpifs.h (fs, acpifs_maptime): Add extern qualifier. * boot/private.h (verbose): Likewise. * eth-multiplexer/netfs_impl.h (multiplexer_maptime): Likewise. * eth-multiplexer/vdev.h (port_bucket, vdev_portclass): Likewise. * exec/priv.h (port_bucket, execboot_portclass): Likewise. * ext2fs/ext2fs.h (sblock, sblock_dirty, block_size, log2_block_size, log2_dev_blocks_per_fs_block, log2_stat_blocks_per_fs_block, zeroblock, frag_size, frags_per_block, inodes_per_block, itb_per_group, db_per_group, desc_per_block, addr_per_block, groups_count, node_to_page_lock, generation_lock, next_generation, group_desc_image, global_pokel, modified_global_blocks, use_xattr_translator_records): Likewise. * hostmux/hostmux.h (hostmux_maptime): Likewise. * isofs/isofs.h (host_name, mounted_on, disk_image, disk_image_len, logical_block_size, sblock): Likewise. * libdiskfs/diskfs.h (diskfs_shortcut_symlink, diskfs_shortcut_chrdev, diskfs_shortcut_blkdev, diskfs_shortcut_fifo, diskfs_shortcut_ifsock, diskfs_create_symlink_hook, diskfs_read_symlink_hook): Likewise. * libnetfs/callbacks.h (_netfs_translator_callback1, _netfs_translator_callback2): Likewise. * libnetfs/priv.h (netfs_mtime): Likewise. * libpager/priv.h (_pager_class): Likewise. * libtrivfs/trivfs.h (trivfs_check_access_hook, trivfs_check_open_hook, trivfs_open_hook, trivfs_protid_create_hook, trivfs_peropen_create_hook, trivfs_protid_destroy_hook, trivfs_peropen_destroy_hook, trivfs_getroot_hook): Likewise. * lwip/lwip-hurd.h (lwip_bucket, socketport_class, addrport_class, shutdown_notify_class, lwip_protid_portclasses, lwip_cntl_portclasses, lwip_bootstrap_portclass, fsys_identity, lwipcntl, lwip_owner, lwip_group): Likewise. * lwip/port/include/netif/hurdtunif.h (tunnel_cntlclass, tunnel_class): Likewise. * nfs/nfs.h (main_udp_socket, hostname, mapped_time): Likewise. * nfsd/nfsd.h (mapped_time, authserver): Likewise. * pci-arbiter/pcifs.h (fs, pcifs_maptime): Likewise. * pci-arbiter/startup.h (pci_shutdown_notify_class, arrange_shutdown_notification): Likewise. * pfinet/pfinet.h (pfinet_bucket, addrport_class, socketport_class, fsys_identity, pfinetctl, pfinet_owner, pfinet_group): Likewise. * pflocal/sserver.h (sock_port_bucket): Likewise. * proc/proc.h (authserver, self_proc, init_proc, startup_proc, proc_bucket, proc_class, generic_port_class, exc_class, generic_port, kernel_proc, global_lock): Likewise. * term/term.h (termstate, termflags, global_lock, carrier_alert, select_alert, pty_select_alert, term_bucket, tty_cntl_class, tty_class, cttyid_class, pty_class, pty_cntl_class, termctl, ptyctl, inputq, rawq, outputq, remote_input_mode, external_processing, term_owner, term_group, term_mode, bottom): Likewise. * usermux/usermux.h (usermux_maptime): Likewise. * utils/msgids.h (msgid_argp): Likewise. * libdiskfs/priv.h (_diskfs_mtime): Remove definition. * lwip/options.h (lwip_argp): Add prototype. * mach-defpager/priv.h (partitions): Name structure. (all_partitions): Add extern qualifier. * acpi/main.c (acpifs_maptime, fs): New variables. * exec/main.c (port_bucket, execboot_portclass): Likewise. * ext2fs/ext2fs.c (sblock, sblock_dirty, block_size, log2_block_size, log2_dev_blocks_per_fs_block, log2_stat_blocks_per_fs_block, frag_size, frags_per_block, inodes_per_block, itb_per_group, db_per_group, desc_per_block, addr_per_block, groups_count, next_generation, group_desc_image, global_pokel, use_xattr_translator_records): Likewise. * isofs/main.c (host_name, mounted_on, logical_block_size, sblock): Likewise. * libpager/pager-create.c (_pager_class): Likewise. * lwip/port/netif/hurdtunif.c (tunnel_cntlclass, tunnel_class): Likewise. * mach-defpager/default_pager.c (all_partitions): Likewise. * nfs/main.c (main_udp_socket, hostname, mapped_time): Likewise. * nfsd/main.c (mapped_time, authserver): Likewise. * pci-arbiter/main.c (fs, pcifs_maptime): Likewise. * pci-arbiter/startup.c (*pci_shutdown_notify_class): Likewise. * pfinet/main.c (pfinetctl, pfinet_owner, pfinet_group, pfinet_bucket, addrport_class, socketport_class, fsys_identity): Likewise. * proc/main.c (authserver, self_proc, init_proc, startup_proc, proc_bucket, proc_class, generic_port_class, exc_class, generic_port, kernel_proc, global_lock): Likewise. * term/main.c (termstate, termflags, global_lock, carrier_alert, select_alert, pty_select_alert, term_bucket, tty_cntl_class, tty_class, cttyid_class, pty_class, pty_cntl_class, termctl, ptyctl, outputq, remote_input_mode, external_processing, term_owner, term_group, term_mode, bottom): Likewise. * usermux/usermux.c (usermux_mapped_time): Rename to usermux_maptime. * lwip/main.c: Include "options.h". (lwip_argp, netif_list): Remove declarations. (lwip_bucket, socketport_class, addrport_class, shutdown_notify_class, lwip_cntl_portclasses, lwip_bootstrap_portclass, lwip_owner, lwip_group, fsys_identity, lwipcntl): New variables. * eth-multiplexer/multiplexer.c (multiplexer_maptime): Add variable. * hostmux/hostmux.c (hostmux_mapped_time): Rename variable to hostmux_maptime * libdiskfs/extra-version.c: Rename file to... * libdiskfs/priv.c: ... new file. (diskfs_shortcut_symlink, diskfs_shortcut_chrdev, diskfs_shortcut_blkdev, diskfs_shortcut_fifo, diskfs_shortcut_ifsock, diskfs_create_symlink_hook, diskfs_read_symlink_hook): Add weak variables. * libdiskfs/Makefile (OTHERSRCS): Replace extra-version.c with priv.c. * libtrivfs/priv.c: New file. * libtrivfs/Makefile (OTHERSRCS): Add priv.c * libcons/extra-version.c: Rename file to... * libcons/priv.c: ... new file. * libcons/Makefile (SRCS): Replace extra-version.c with priv.c. Fix build with #
Diffstat (limited to 'libdiskfs')
-rw-r--r--libdiskfs/Makefile2
-rw-r--r--libdiskfs/diskfs.h14
-rw-r--r--libdiskfs/priv.c (renamed from libdiskfs/extra-version.c)11
-rw-r--r--libdiskfs/priv.h2
4 files changed, 18 insertions, 11 deletions
diff --git a/libdiskfs/Makefile b/libdiskfs/Makefile
index 66c9f53e..aa6b24a4 100644
--- a/libdiskfs/Makefile
+++ b/libdiskfs/Makefile
@@ -52,7 +52,7 @@ OTHERSRCS = conch-fetch.c conch-set.c dir-clear.c dir-init.c dir-renamed.c \
remount.c console.c disk-pager.c \
name-cache.c direnter.c dirrewrite.c dirremove.c lookup.c dead-name.c \
validate-mode.c validate-group.c validate-author.c validate-flags.c \
- validate-rdev.c validate-owner.c extra-version.c get-source.c
+ validate-rdev.c validate-owner.c priv.c get-source.c
SRCS = $(OTHERSRCS) $(FSSRCS) $(IOSRCS) $(FSYSSRCS) $(IFSOCKSRCS)
installhdrs = diskfs.h diskfs-pager.h
diff --git a/libdiskfs/diskfs.h b/libdiskfs/diskfs.h
index 272dd57e..dfccf880 100644
--- a/libdiskfs/diskfs.h
+++ b/libdiskfs/diskfs.h
@@ -276,23 +276,23 @@ extern char *diskfs_extra_version;
if the symlink hook functions return EINVAL or are not defined.
The library knows that the dn_stat.st_size field is the length of
the symlink, even if the hook functions are used. */
-int diskfs_shortcut_symlink;
+extern int diskfs_shortcut_symlink;
/* The user may define this variable. This should be nonzero iff the
filesystem format supports shortcutting chrdev translation. */
-int diskfs_shortcut_chrdev;
+extern int diskfs_shortcut_chrdev;
/* The user may define this variable. This should be nonzero iff the
filesystem format supports shortcutting blkdev translation. */
-int diskfs_shortcut_blkdev;
+extern int diskfs_shortcut_blkdev;
/* The user may define this variable. This should be nonzero iff the
filesystem format supports shortcutting fifo translation. */
-int diskfs_shortcut_fifo;
+extern int diskfs_shortcut_fifo;
/* The user may define this variable. This should be nonzero iff the
filesystem format supports shortcutting ifsock translation. */
-int diskfs_shortcut_ifsock;
+extern int diskfs_shortcut_ifsock;
/* The user may define this variable, otherwise it has a default value of 30.
diskfs_set_sync_interval is called with this value when the first diskfs
@@ -576,13 +576,13 @@ error_t diskfs_node_reload (struct node *node);
is called to set a symlink. If it returns EINVAL or isn't set,
then the normal method (writing the contents into the file data) is
used. If it returns any other error, it is returned to the user. */
-error_t (*diskfs_create_symlink_hook)(struct node *np, const char *target);
+extern error_t (*diskfs_create_symlink_hook)(struct node *np, const char *target);
/* If this function is nonzero (and diskfs_shortcut_symlink is set) it
is called to read the contents of a symlink. If it returns EINVAL or
isn't set, then the normal method (reading from the file data) is
used. If it returns any other error, it is returned to the user. */
-error_t (*diskfs_read_symlink_hook)(struct node *np, char *target);
+extern error_t (*diskfs_read_symlink_hook)(struct node *np, char *target);
/* The user may define this function. The function must set source to
the source of the translator. The function may return an EOPNOTSUPP
diff --git a/libdiskfs/extra-version.c b/libdiskfs/priv.c
index 51920aa7..e5f0e2fd 100644
--- a/libdiskfs/extra-version.c
+++ b/libdiskfs/priv.c
@@ -1,4 +1,4 @@
-/* Default value for diskfs_extra_version
+/* Default values for weak variables
Copyright (C) 1996 Free Software Foundation, Inc.
Written by Thomas Bushnell, n/BSG.
@@ -22,3 +22,12 @@
#include "priv.h"
char *diskfs_extra_version __attribute__ ((weak)) = "";
+int diskfs_shortcut_symlink __attribute__ ((weak)) = 0;
+int diskfs_shortcut_chrdev __attribute__ ((weak)) = 0;
+int diskfs_shortcut_blkdev __attribute__ ((weak)) = 0;
+int diskfs_shortcut_fifo __attribute__ ((weak)) = 0;
+int diskfs_shortcut_ifsock __attribute__ ((weak)) = 0;
+error_t (*diskfs_create_symlink_hook)(struct node *np, const char *target)
+ __attribute__ ((weak));
+error_t (*diskfs_read_symlink_hook)(struct node *np, char *target)
+ __attribute__ ((weak));
diff --git a/libdiskfs/priv.h b/libdiskfs/priv.h
index bece45a0..5be7c2b5 100644
--- a/libdiskfs/priv.h
+++ b/libdiskfs/priv.h
@@ -52,8 +52,6 @@ extern char **_diskfs_boot_command;
/* Port cell holding a cached port to the exec server. */
extern struct hurd_port _diskfs_exec_portcell;
-volatile struct mapped_time_value *_diskfs_mtime;
-
extern const struct argp_option diskfs_common_options[];
/* Option keys for long-only options in diskfs_common_options. */
#define OPT_SUID_OK 600 /* --suid-ok */