Make cd9660_util.c usable in userland tools like installboot(8).

This was partially done for src/distrib/cdrom/macppc_installboot,
but more strict prototypes are necessary for native binary builds.
This commit is contained in:
tsutsui 2024-05-19 15:41:53 +00:00
parent 14cc0335a4
commit 40d859218e
2 changed files with 7 additions and 10 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: cd9660_extern.h,v 1.28 2024/02/02 20:27:26 christos Exp $ */
/* $NetBSD: cd9660_extern.h,v 1.29 2024/05/19 15:41:53 tsutsui Exp $ */
/*-
* Copyright (c) 1994
@ -105,10 +105,11 @@ extern int (**cd9660_vnodeop_p)(void *);
extern int (**cd9660_specop_p)(void *);
extern int (**cd9660_fifoop_p)(void *);
int isochar(const u_char *, const u_char *, int, u_int16_t *);
int isofncmp(const u_char *, size_t, const u_char *, size_t, int);
void isofntrans(const u_char *, int, u_char *, u_short *, int, int, int, int);
ino_t isodirino(struct iso_directory_record *, struct iso_mnt *);
#endif /* _KERNEL */
int isochar(const u_char *, const u_char *, int, u_int16_t *);
int isofncmp(const u_char *, size_t, const u_char *, size_t, int);
void isofntrans(const u_char *, int, u_char *, u_short *, int, int, int, int);
#endif /* _ISOFS_CD9660_CD9660_EXTERN_H_ */

View File

@ -1,4 +1,4 @@
/* $NetBSD: cd9660_util.c,v 1.14 2016/03/09 20:18:17 christos Exp $ */
/* $NetBSD: cd9660_util.c,v 1.15 2024/05/19 15:41:53 tsutsui Exp $ */
/*-
* Copyright (c) 1994
@ -38,7 +38,7 @@
#include <sys/cdefs.h>
#ifdef _KERNEL
__KERNEL_RCSID(0, "$NetBSD: cd9660_util.c,v 1.14 2016/03/09 20:18:17 christos Exp $");
__KERNEL_RCSID(0, "$NetBSD: cd9660_util.c,v 1.15 2024/05/19 15:41:53 tsutsui Exp $");
#else
/* used by macppc_installboot */
#if HAVE_NBTOOL_CONFIG_H
@ -66,11 +66,7 @@ __KERNEL_RCSID(0, "$NetBSD: cd9660_util.c,v 1.14 2016/03/09 20:18:17 christos Ex
#endif
#include <fs/cd9660/iso.h>
#ifdef _KERNEL
#include <fs/cd9660/cd9660_extern.h>
#else
static int isochar(const u_char *, const u_char *, int, uint16_t *);
#endif
#include <fs/unicode.h>