Updating libutil from netbsd

This commit is contained in:
2012-09-11 18:02:49 +02:00
parent e1c1f5bfd9
commit dba3562d78
28 changed files with 1087 additions and 246 deletions

View File

@@ -1,4 +1,4 @@
/* $NetBSD: util.h,v 1.55 2010/02/25 18:37:12 joerg Exp $ */
/* $NetBSD: util.h,v 1.63 2012/04/07 16:44:59 christos Exp $ */
/*-
* Copyright (c) 1995
@@ -35,11 +35,13 @@
#include <sys/cdefs.h>
#include <sys/ttycom.h>
#include <sys/types.h>
#include <stdio.h>
#include <pwd.h>
#include <stdarg.h>
#include <stdio.h>
#include <termios.h>
#include <utmp.h>
#include <utmpx.h>
#include <stdint.h>
#include <machine/ansi.h>
#ifdef _BSD_TIME_T_
@@ -68,8 +70,13 @@ pid_t forkpty(int *, char *, struct termios *, struct winsize *);
const char *getbootfile(void);
off_t getlabeloffset(void);
int getlabelsector(void);
int getlabelusesmbr(void);
int getmaxpartitions(void);
int getrawpartition(void);
const char *getdiskrawname(char *, size_t, const char *);
const char *getdiskcookedname(char *, size_t, const char *);
const char *getfstypename(int);
const char *getfsspecname(char *, size_t, const char *);
#ifndef __LIBC12_SOURCE__
void login(const struct utmp *) __RENAME(__login50);
void loginx(const struct utmpx *) __RENAME(__loginx50);
@@ -98,7 +105,7 @@ int pw_copyx(int, int, struct passwd *, struct passwd *,
char *, size_t) __RENAME(__pw_copyx50);
#endif
void pw_edit(int, const char *);
void pw_error(const char *, int, int);
__dead void pw_error(const char *, int, int);
void pw_getconf(char *, size_t, const char *, const char *);
#ifndef __LIBC12_SOURCE__
void pw_getpwconf(char *, size_t, const struct passwd *,
@@ -116,6 +123,8 @@ int snprintb_m(char *, size_t, const char *, uint64_t, size_t);
int snprintb(char *, size_t, const char *, uint64_t);
int sockaddr_snprintf(char *, size_t, const char *,
const struct sockaddr *);
char *strpct(char *, size_t, uintmax_t, uintmax_t, size_t);
char *strspct(char *, size_t, intmax_t, intmax_t, size_t);
int string_to_flags(char **, unsigned long *, unsigned long *);
int ttyaction(const char *, const char *, const char *);
int ttylock(const char *, int, pid_t *);
@@ -138,8 +147,7 @@ void *erealloc(void *, size_t);
struct __sFILE *efopen(const char *, const char *);
int easprintf(char ** __restrict, const char * __restrict, ...)
__printflike(2, 3);
int evasprintf(char ** __restrict, const char * __restrict,
_BSD_VA_LIST_)
int evasprintf(char ** __restrict, const char * __restrict, va_list)
__printflike(2, 0);
__END_DECLS