summaryrefslogtreecommitdiff
path: root/libdiskfs
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2012-03-25 22:13:55 +0200
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2012-03-25 22:33:49 +0200
commit69056411a354300a17d1e92027435c988508655d (patch)
tree0d3741400b400cef79c7bf52625adc8966f2207f /libdiskfs
parentf605070d37c741436b5f82745eae2a5c018e304d (diff)
Fix extern inline use
* ext2fs/Makefile (SRCS): Add xinl.c * libtreefs/Makefile (OTHERSRCS): Likewise. * term/Makefile (SRCS): Likewise. * ufs/Makefile (SRCS): Likewise. * hostmux/hostmux-xinl.c: Define HOSTMUX_DEFINE_EI instead of HOSTMUX_EI. * libdiskfs/extern-inline.c: Define DISKFS_DEFINE_EXTERN_INLINE instead of DISKFS_EXTERN_INLINE. * libftpconn/xinl.c: Define FTP_CONN_DEFINE_EI instead of FTP_CONN_EI. * libpipe/pipe-funcs.c: Define PIPE_DEFINE_EI instead of PIPE_EI. * libpipe/pq-funcs.c: Define PQ_DEFINE_EI instead of PQ_EI. * libshouldbeinlibc/idvec-funcs.c: Define IDVEC_DEFINE_EI instead of IDVEC_EI. * libshouldbeinlibc/maptime-funcs.c: Define MAPTIME_DEFINE_EI instead of MAPTIME_EI. * libshouldbeinlibc/ugids-xinl.c: Define UGIDS_DEFINE_EI instead of UGIDS_EI. * libstore/xinl.c: Define STORE_DEFINE_EI instead of STORE_EI. * libthreads/rwlock.c: Define RWLOCK_DEFINE_EI instead of RWLOCK_EI. * ext2fs/xinl.c: New file, define EXT2FS_DEFINE_EI and include "ext2fs.h" * libtreefs/xinl.c: New file, define TREEFS_DEFINE_EI and include "treefs.h" and "mig-decls.h". * term/xinl.c: New file, define TERM_DEFINE_EI and include "term.h". * ufs/xinl.c: New file, define UFS_DEFINE_EI and include "ufs.h" * ext2fs/ext2fs.h: Include <features.h>, define EXT2FS_EI to __extern_inline instead of "extern inline", define it to empty when EXT2FS_DEFINE_EI is defined. Always declare extern inline prototypes, and define extern inlines content only if __USE_EXTERN_INLINES or EXT2FS_DEFINE_EI is defined. * libdiskfs/diskfs.h: Likewise with DISKFS_EXTERN_INLINE and DISKFS_DEFINE_EXTERN_INLINE. * libftpconn/ftpconn.h: Likewise with FTP_CONN_EI and FTP_CONN_DEFINE_EI. * libftpconn/priv.h: Likewise. * libpipe/pipe.h: Likewise with PIPE_EI and PIPE_DEFINE_EI. * libpipe/pq.h: Likewise with PQ_EI and PQ_DEFINE_EI. * libshouldbeinlibc/idvec.h: Likewise with IDVEC_EI and IDVEC_DEFINE_EI. * libshouldbeinlibc/maptime.h: Likewise with MAPTIME_EI and MAPTIME_DEFINE_EI. * libshouldbeinlibc/ugids.h: Likewise with UGIDS_EI and UGIDS_DEFINE_EI. * libstore/store.h: Likewise with STORE_EI and STORE_DEFINE_EI. * libthreads/rwlock.h: Likewise with RWLOCK_EI and RWLOCK_DEFINE_EI. * term/term.h: Likewise with TERM_EI and TERM_DEFINE_EI. * ufs/ufs.h: Likewise with UFS_EI and UFS_DEFINE_EI. * libtreefs/treefs.h: Include <features.h>, define TREE_FS_EI to __extern_inline, or to empty when TREEFS_DEFINE_EI is defined. Use TREEFS_EI instead of "extern inline". * libtreefs/mig-decls.h: Use TREEFS_EI instead of "extern inline".
Diffstat (limited to 'libdiskfs')
-rw-r--r--libdiskfs/diskfs.h15
-rw-r--r--libdiskfs/extern-inline.c2
2 files changed, 14 insertions, 3 deletions
diff --git a/libdiskfs/diskfs.h b/libdiskfs/diskfs.h
index 9a61964c..2051e41d 100644
--- a/libdiskfs/diskfs.h
+++ b/libdiskfs/diskfs.h
@@ -27,9 +27,12 @@
#include <hurd/fshelp.h>
#include <hurd/iohelp.h>
#include <idvec.h>
+#include <features.h>
-#ifndef DISKFS_EXTERN_INLINE
-#define DISKFS_EXTERN_INLINE extern inline
+#ifdef DISKFS_DEFINE_EXTERN_INLINE
+#define DISKFS_EXTERN_INLINE
+#else
+#define DISKFS_EXTERN_INLINE __extern_inline
#endif
/* Each user port referring to a file points to one of these
@@ -781,6 +784,12 @@ error_t diskfs_start_protid (struct peropen *po, struct protid **cred);
the user to install is USER. */
void diskfs_finish_protid (struct protid *cred, struct iouser *user);
+extern struct protid * diskfs_begin_using_protid_port (file_t port);
+
+extern void diskfs_end_using_protid_port (struct protid *cred);
+
+#if defined(__USE_EXTERN_INLINES) || defined(DISKFS_DEFINE_EXTERN_INLINE)
+
/* Called by MiG to translate ports into struct protid *.
fsmutations.h arranges for this to happen for the io and
fs interfaces. */
@@ -800,6 +809,8 @@ diskfs_end_using_protid_port (struct protid *cred)
ports_port_deref (cred);
}
+#endif /* Use extern inlines. */
+
/* Called when a protid CRED has no more references. (Because references\
to protids are maintained by the port management library, this is
installed in the clean routines list.) The ports library will
diff --git a/libdiskfs/extern-inline.c b/libdiskfs/extern-inline.c
index 0abcc4cc..43de88d6 100644
--- a/libdiskfs/extern-inline.c
+++ b/libdiskfs/extern-inline.c
@@ -15,6 +15,6 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
-#define DISKFS_EXTERN_INLINE
+#define DISKFS_DEFINE_EXTERN_INLINE
#include "diskfs.h"