autofs_strdup_space_hack as a macro to str3cat(NULL,(s)," ","").
This works everywhere and we avoid linking problems, inline
functions, etc.
* conf/autofs/autofs_solaris_v1.c (autofs_mount_fs): remove
autofs_strdup_space_hack() function altogether.
2005-10-07 Erez Zadok <ezk@cs.sunysb.edu>
+ * conf/autofs/autofs_solaris_v1.h: redefine
+ autofs_strdup_space_hack as a macro to str3cat(NULL,(s)," ","").
+ This works everywhere and we avoid linking problems, inline
+ functions, etc.
+
+ * conf/autofs/autofs_solaris_v1.c (autofs_mount_fs): remove
+ autofs_strdup_space_hack() function altogether.
+
* m4/macros/os_cflags.m4: remove hack that hardcodes pte_t=u_int.
* configure.in: test for <sys/immu.h> header.
}
-/*
- * autofs hack: append a space to the directory name
- * to stop the kernel->daemon recursion.
- *
- * Returns malloc'ed space which needs to be freed by the caller.
- */
-static char *
-autofs_strdup_space_hack(char *s)
-{
- size_t l = strlen(s) + 2;
- char *tmp = xmalloc(l);
- xstrlcpy(tmp, s, l);
- xstrlcat(tmp, " ", l);
- return tmp;
-}
-
-
int
autofs_mount_fs(am_node *mp, mntfs *mf)
{
typedef autofs_args_t autofs_fh_t;
#define NEED_AUTOFS_SPACE_HACK
+/*
+ * autofs hack: append a space to the directory name
+ * to stop the kernel->daemon recursion.
+ *
+ * Returns malloc'ed space which needs to be freed by the caller.
+ */
+#define autofs_strdup_space_hack(s) str3cat(NULL, (s), " ", "")
#define AUTOFS_AUTO_FS_FLAGS (FS_AMQINFO | FS_DIRECTORY | FS_AUTOFS | FS_ON_AUTOFS)
#define AUTOFS_DIRECT_FS_FLAGS (FS_DIRECT | FS_NOTIMEOUT | FS_BACKGROUND | FS_AMQINFO | FS_DIRECTORY | FS_AUTOFS)