Browse Source

Adapt things to use __type_t instead of _BSD_TYPE_T_

Add new sys/_types.h header
Include machine/_types.h or sys/_types.h where applicable
OPENBSD_3_9
millert 19 years ago
parent
commit
605c5586ca
11 changed files with 112 additions and 114 deletions
  1. +4
    -2
      src/include/bsd_auth.h
  2. +11
    -11
      src/include/err.h
  3. +5
    -5
      src/include/search.h
  4. +19
    -17
      src/include/stddef.h
  5. +17
    -18
      src/include/stdio.h
  6. +9
    -11
      src/include/stdlib.h
  7. +5
    -5
      src/include/string.h
  8. +11
    -11
      src/include/time.h
  9. +6
    -7
      src/include/utime.h
  10. +14
    -16
      src/include/wchar.h
  11. +11
    -11
      src/include/wctype.h

+ 4
- 2
src/include/bsd_auth.h View File

@ -1,4 +1,4 @@
/* $OpenBSD: bsd_auth.h,v 1.8 2002/08/30 08:50:01 espie Exp $ */
/* $OpenBSD: bsd_auth.h,v 1.9 2006/01/06 18:53:04 millert Exp $ */
/*-
* Copyright (c) 1997 Berkeley Software Design, Inc. All rights reserved.
@ -37,6 +37,8 @@
#ifndef _BSD_AUTH_H_
#define _BSD_AUTH_H_
#include <machine/_types.h> /* for __va_list */
typedef struct auth_session_t auth_session_t;
typedef enum {
@ -84,7 +86,7 @@ int auth_call(auth_session_t *, char *, ...)
int auth_setdata(auth_session_t *, void *, size_t);
int auth_setoption(auth_session_t *, char *, char *);
int auth_setpwd(auth_session_t *, struct passwd *pwd);
void auth_set_va_list(auth_session_t *, _BSD_VA_LIST_);
void auth_set_va_list(auth_session_t *, __va_list);
struct passwd *auth_getpwd(auth_session_t *);


+ 11
- 11
src/include/err.h View File

@ -1,4 +1,4 @@
/* $OpenBSD: err.h,v 1.9 2003/06/02 19:34:12 millert Exp $ */
/* $OpenBSD: err.h,v 1.10 2006/01/06 18:53:04 millert Exp $ */
/* $NetBSD: err.h,v 1.11 1994/10/26 00:55:52 cgd Exp $ */
/*-
@ -40,28 +40,28 @@
* places (<machine/varargs.h> and <machine/stdarg.h>), so if we include one
* of them here we may collide with the utility's includes. It's unreasonable
* for utilities to have to include one of them to include err.h, so we get
* _BSD_VA_LIST_ from <machine/ansi.h> and use it.
* __va_list from <machine/_types.h> and use it.
*/
#include <machine/ansi.h>
#include <sys/cdefs.h>
#include <machine/_types.h>
__BEGIN_DECLS
__dead void err(int, const char *, ...)
__attribute__((__format__ (printf, 2, 3)));
__dead void verr(int, const char *, _BSD_VA_LIST_)
__dead void verr(int, const char *, __va_list)
__attribute__((__format__ (printf, 2, 0)));
__dead void errx(int, const char *, ...)
__attribute__((__format__ (printf, 2, 3)));
__dead void verrx(int, const char *, _BSD_VA_LIST_)
__dead void verrx(int, const char *, __va_list)
__attribute__((__format__ (printf, 2, 0)));
void warn(const char *, ...)
__attribute__((__format__ (printf, 1, 2)));
void vwarn(const char *, _BSD_VA_LIST_)
void vwarn(const char *, __va_list)
__attribute__((__format__ (printf, 1, 0)));
void warnx(const char *, ...)
__attribute__((__format__ (printf, 1, 2)));
void vwarnx(const char *, _BSD_VA_LIST_)
void vwarnx(const char *, __va_list)
__attribute__((__format__ (printf, 1, 0)));
/*
@ -70,19 +70,19 @@ void vwarnx(const char *, _BSD_VA_LIST_)
*/
__dead void _err(int, const char *, ...)
__attribute__((__format__ (printf, 2, 3)));
__dead void _verr(int, const char *, _BSD_VA_LIST_)
__dead void _verr(int, const char *, __va_list)
__attribute__((__format__ (printf, 2, 0)));
__dead void _errx(int, const char *, ...)
__attribute__((__format__ (printf, 2, 3)));
__dead void _verrx(int, const char *, _BSD_VA_LIST_)
__dead void _verrx(int, const char *, __va_list)
__attribute__((__format__ (printf, 2, 0)));
void _warn(const char *, ...)
__attribute__((__format__ (printf, 1, 2)));
void _vwarn(const char *, _BSD_VA_LIST_)
void _vwarn(const char *, __va_list)
__attribute__((__format__ (printf, 1, 0)));
void _warnx(const char *, ...)
__attribute__((__format__ (printf, 1, 2)));
void _vwarnx(const char *, _BSD_VA_LIST_)
void _vwarnx(const char *, __va_list)
__attribute__((__format__ (printf, 1, 0)));
__END_DECLS


+ 5
- 5
src/include/search.h View File

@ -1,4 +1,4 @@
/* $OpenBSD: search.h,v 1.7 2004/07/08 21:15:11 millert Exp $ */
/* $OpenBSD: search.h,v 1.8 2006/01/06 18:53:04 millert Exp $ */
/* $NetBSD: search.h,v 1.9 1995/08/08 21:14:45 jtc Exp $ */
/*
@ -10,11 +10,11 @@
#define _SEARCH_H_
#include <sys/cdefs.h>
#include <machine/ansi.h>
#include <machine/_types.h>
#ifdef _BSD_SIZE_T_
typedef _BSD_SIZE_T_ size_t;
#undef _BSD_SIZE_T_
#ifndef _SIZE_T_DEFINED_
#define _SIZE_T_DEFINED_
typedef __size_t size_t;
#endif
typedef struct entry {


+ 19
- 17
src/include/stddef.h View File

@ -1,4 +1,4 @@
/* $OpenBSD: stddef.h,v 1.8 2005/05/11 18:44:12 espie Exp $ */
/* $OpenBSD: stddef.h,v 1.9 2006/01/06 18:53:04 millert Exp $ */
/* $NetBSD: stddef.h,v 1.4 1994/10/26 00:56:26 cgd Exp $ */
/*-
@ -35,31 +35,33 @@
#ifndef _STDDEF_H_
#define _STDDEF_H_
#include <machine/ansi.h>
#include <sys/cdefs.h>
#include <sys/_types.h>
typedef _BSD_PTRDIFF_T_ ptrdiff_t;
#ifndef _PTRDIFF_T_DEFINED_
#define _PTRDIFF_T_DEFINED_
typedef __ptrdiff_t ptrdiff_t;
#endif
#ifdef _BSD_SIZE_T_
typedef _BSD_SIZE_T_ size_t;
#undef _BSD_SIZE_T_
#ifndef _SIZE_T_DEFINED_
#define _SIZE_T_DEFINED_
typedef __size_t size_t;
#endif
#ifdef _BSD_WCHAR_T_
/* in C++, wchar_t is a built-in type */
#ifndef __cplusplus
typedef _BSD_WCHAR_T_ wchar_t;
#undef _BSD_WCHAR_T_
#endif
#if !defined(_WCHAR_T_DEFINED_) && !defined(__cplusplus)
#define _WCHAR_T_DEFINED_
typedef __wchar_t wchar_t;
#endif
#ifdef _BSD_WINT_T_
typedef _BSD_WINT_T_ wint_t;
#undef _BSD_WINT_T_
#ifndef _WINT_T_DEFINED_
#define _WINT_T_DEFINED_
typedef __wint_t wint_t;
#endif
#ifdef _BSD_MBSTATE_T_
typedef _BSD_MBSTATE_T_ mbstate_t;
#undef _BSD_MBSTATE_T_
#ifndef _MBSTATE_T_DEFINED_
#define _MBSTATE_T_DEFINED_
typedef __mbstate_t mbstate_t;
#endif
#ifndef NULL


+ 17
- 18
src/include/stdio.h View File

@ -1,4 +1,4 @@
/* $OpenBSD: stdio.h,v 1.33 2005/12/13 00:35:22 millert Exp $ */
/* $OpenBSD: stdio.h,v 1.34 2006/01/06 18:53:04 millert Exp $ */
/* $NetBSD: stdio.h,v 1.18 1996/04/25 18:29:21 jtc Exp $ */
/*-
@ -39,21 +39,20 @@
#define _STDIO_H_
#include <sys/cdefs.h>
#include <sys/_types.h>
#if __BSD_VISIBLE || __POSIX_VISIBLE || __XPG_VISIBLE
#include <sys/types.h>
#include <sys/types.h> /* XXX should be removed */
#endif
#include <machine/ansi.h>
#ifdef _BSD_SIZE_T_
typedef _BSD_SIZE_T_ size_t;
#undef _BSD_SIZE_T_
#ifndef _SIZE_T_DEFINED_
#define _SIZE_T_DEFINED_
typedef __size_t size_t;
#endif
#ifdef _BSD_OFF_T_
typedef _BSD_OFF_T_ off_t;
#undef _BSD_OFF_T_
#ifndef _OFF_T_DEFINED_
#define _OFF_T_DEFINED_
typedef __off_t off_t;
#endif
#ifndef NULL
@ -258,26 +257,26 @@ int sscanf(const char *, const char *, ...);
FILE *tmpfile(void);
char *tmpnam(char *);
int ungetc(int, FILE *);
int vfprintf(FILE *, const char *, _BSD_VA_LIST_);
int vprintf(const char *, _BSD_VA_LIST_);
int vsprintf(char *, const char *, _BSD_VA_LIST_);
int vfprintf(FILE *, const char *, __va_list);
int vprintf(const char *, __va_list);
int vsprintf(char *, const char *, __va_list);
#if __ISO_C_VISIBLE >= 1999 || __BSD_VISIBLE
int snprintf(char *, size_t, const char *, ...)
__attribute__((__format__ (printf, 3, 4)))
__attribute__((__nonnull__ (3)))
__attribute__((__bounded__ (__string__,1,2)));
int vfscanf(FILE *, const char *, _BSD_VA_LIST_)
int vfscanf(FILE *, const char *, __va_list)
__attribute__((__format__ (scanf, 2, 0)))
__attribute__((__nonnull__ (2)));
int vscanf(const char *, _BSD_VA_LIST_)
int vscanf(const char *, __va_list)
__attribute__((__format__ (scanf, 1, 0)))
__attribute__((__nonnull__ (1)));
int vsnprintf(char *, size_t, const char *, _BSD_VA_LIST_)
int vsnprintf(char *, size_t, const char *, __va_list)
__attribute__((__format__ (printf, 3, 0)))
__attribute__((__nonnull__ (3)))
__attribute__((__bounded__(__string__,1,2)));
int vsscanf(const char *, const char *, _BSD_VA_LIST_)
int vsscanf(const char *, const char *, __va_list)
__attribute__((__format__ (scanf, 2, 0)))
__attribute__((__nonnull__ (2)));
#endif /* __ISO_C_VISIBLE >= 1999 || __BSD_VISIBLE */
@ -346,7 +345,7 @@ int getw(FILE *);
int putw(int, FILE *);
void setbuffer(FILE *, char *, int);
int setlinebuf(FILE *);
int vasprintf(char **, const char *, _BSD_VA_LIST_)
int vasprintf(char **, const char *, __va_list)
__attribute__((__format__ (printf, 2, 0)))
__attribute__((__nonnull__ (2)));
__END_DECLS


+ 9
- 11
src/include/stdlib.h View File

@ -1,4 +1,4 @@
/* $OpenBSD: stdlib.h,v 1.35 2005/12/13 00:35:22 millert Exp $ */
/* $OpenBSD: stdlib.h,v 1.36 2006/01/06 18:53:04 millert Exp $ */
/* $NetBSD: stdlib.h,v 1.25 1995/12/27 21:19:08 jtc Exp $ */
/*-
@ -34,24 +34,22 @@
#ifndef _STDLIB_H_
#define _STDLIB_H_
#include <machine/ansi.h>
#include <sys/cdefs.h>
#if __BSD_VISIBLE /* for quad_t, etc. */
#include <machine/_types.h>
#if __BSD_VISIBLE /* for quad_t, etc. (XXX - use protected types) */
#include <sys/types.h>
#endif
#ifdef _BSD_SIZE_T_
typedef _BSD_SIZE_T_ size_t;
#undef _BSD_SIZE_T_
#ifndef _SIZE_T_DEFINED_
#define _SIZE_T_DEFINED_
typedef __size_t size_t;
#endif
#ifdef _BSD_WCHAR_T_
/* in C++, wchar_t is a built-in type */
#ifndef __cplusplus
typedef _BSD_WCHAR_T_ wchar_t;
#endif
#undef _BSD_WCHAR_T_
#if !defined(_WCHAR_T_DEFINED_) && !defined(__cplusplus)
#define _WCHAR_T_DEFINED_
typedef __wchar_t wchar_t;
#endif
typedef struct {


+ 5
- 5
src/include/string.h View File

@ -1,4 +1,4 @@
/* $OpenBSD: string.h,v 1.16 2005/12/13 00:35:22 millert Exp $ */
/* $OpenBSD: string.h,v 1.17 2006/01/06 18:53:04 millert Exp $ */
/* $NetBSD: string.h,v 1.6 1994/10/26 00:56:30 cgd Exp $ */
/*-
@ -36,11 +36,11 @@
#define _STRING_H_
#include <sys/cdefs.h>
#include <machine/ansi.h>
#include <machine/_types.h>
#ifdef _BSD_SIZE_T_
typedef _BSD_SIZE_T_ size_t;
#undef _BSD_SIZE_T_
#ifndef _SIZE_T_DEFINED_
#define _SIZE_T_DEFINED_
typedef __size_t size_t;
#endif
#ifndef NULL


+ 11
- 11
src/include/time.h View File

@ -1,4 +1,4 @@
/* $OpenBSD: time.h,v 1.17 2005/12/13 00:35:22 millert Exp $ */
/* $OpenBSD: time.h,v 1.18 2006/01/06 18:53:04 millert Exp $ */
/* $NetBSD: time.h,v 1.9 1994/10/26 00:56:35 cgd Exp $ */
/*
@ -42,7 +42,7 @@
#define _TIME_H_
#include <sys/cdefs.h>
#include <machine/ansi.h>
#include <machine/_types.h>
#ifndef NULL
#ifdef __GNUG__
@ -52,19 +52,19 @@
#endif
#endif
#ifdef _BSD_CLOCK_T_
typedef _BSD_CLOCK_T_ clock_t;
#undef _BSD_CLOCK_T_
#ifndef _CLOCK_T_DEFINED_
#define _CLOCK_T_DEFINED_
typedef __clock_t clock_t;
#endif
#ifdef _BSD_TIME_T_
typedef _BSD_TIME_T_ time_t;
#undef _BSD_TIME_T_
#ifndef _TIME_T_DEFINED_
#define _TIME_T_DEFINED_
typedef __time_t time_t;
#endif
#ifdef _BSD_SIZE_T_
typedef _BSD_SIZE_T_ size_t;
#undef _BSD_SIZE_T_
#ifndef _SIZE_T_DEFINED_
#define _SIZE_T_DEFINED_
typedef __size_t size_t;
#endif
#if __POSIX_VISIBLE > 0 && __POSIX_VISIBLE < 200112 || __BSD_VISIBLE


+ 6
- 7
src/include/utime.h View File

@ -1,4 +1,4 @@
/* $OpenBSD: utime.h,v 1.5 2003/06/02 19:34:12 millert Exp $ */
/* $OpenBSD: utime.h,v 1.6 2006/01/06 18:53:04 millert Exp $ */
/* $NetBSD: utime.h,v 1.3 1994/10/26 00:56:39 cgd Exp $ */
/*-
@ -35,11 +35,12 @@
#ifndef _UTIME_H_
#define _UTIME_H_
#include <machine/ansi.h>
#include <sys/cdefs.h>
#include <machine/_types.h>
#ifdef _BSD_TIME_T_
typedef _BSD_TIME_T_ time_t;
#undef _BSD_TIME_T_
#ifndef _TIME_T_DEFINED_
#define _TIME_T_DEFINED_
typedef __time_t time_t;
#endif
struct utimbuf {
@ -47,8 +48,6 @@ struct utimbuf {
time_t modtime; /* Modification time */
};
#include <sys/cdefs.h>
__BEGIN_DECLS
int utime(const char *, const struct utimbuf *);
__END_DECLS


+ 14
- 16
src/include/wchar.h View File

@ -1,4 +1,4 @@
/* $OpenBSD: wchar.h,v 1.7 2005/12/19 17:05:20 millert Exp $ */
/* $OpenBSD: wchar.h,v 1.8 2006/01/06 18:53:04 millert Exp $ */
/* $NetBSD: wchar.h,v 1.16 2003/03/07 07:11:35 tshiozak Exp $ */
/*-
@ -67,7 +67,7 @@
#define _WCHAR_H_
#include <sys/cdefs.h>
#include <machine/ansi.h>
#include <sys/_types.h>
#ifndef NULL
#ifdef __GNUG__
@ -79,26 +79,24 @@
#include <stdio.h> /* for FILE* */
#ifdef _BSD_WCHAR_T_
# ifndef __cplusplus
typedef _BSD_WCHAR_T_ wchar_t;
# endif
#undef _BSD_WCHAR_T_
#if !defined(_WCHAR_T_DEFINED_) && !defined(__cplusplus)
#define _WCHAR_T_DEFINED_
typedef __wchar_t wchar_t;
#endif
#ifdef _BSD_MBSTATE_T_
typedef _BSD_MBSTATE_T_ mbstate_t;
#undef _BSD_MBSTATE_T_
#ifndef _MBSTATE_T_DEFINED_
#define _MBSTATE_T_DEFINED_
typedef __mbstate_t mbstate_t;
#endif
#ifdef _BSD_WINT_T_
typedef _BSD_WINT_T_ wint_t;
#undef _BSD_WINT_T_
#ifndef _WINT_T_DEFINED_
#define _WINT_T_DEFINED_
typedef __wint_t wint_t;
#endif
#ifdef _BSD_SIZE_T_
typedef _BSD_SIZE_T_ size_t;
#undef _BSD_SIZE_T_
#ifndef _SIZE_T_DEFINED_
#define _SIZE_T_DEFINED_
typedef __size_t size_t;
#endif
#ifndef WEOF


+ 11
- 11
src/include/wctype.h View File

@ -1,4 +1,4 @@
/* $OpenBSD: wctype.h,v 1.4 2005/07/01 08:59:27 espie Exp $ */
/* $OpenBSD: wctype.h,v 1.5 2006/01/06 18:53:04 millert Exp $ */
/* $NetBSD: wctype.h,v 1.5 2003/03/02 22:18:11 tshiozak Exp $ */
/*-
@ -33,21 +33,21 @@
#define _WCTYPE_H_
#include <sys/cdefs.h>
#include <machine/ansi.h>
#include <machine/_types.h>
#ifdef _BSD_WINT_T_
typedef _BSD_WINT_T_ wint_t;
#undef _BSD_WINT_T_
#ifndef _WINT_T_DEFINED_
#define _WINT_T_DEFINED_
typedef __wint_t wint_t;
#endif
#ifdef _BSD_WCTRANS_T_
typedef _BSD_WCTRANS_T_ wctrans_t;
#undef _BSD_WCTRANS_T_
#ifndef _WCTRANS_T_DEFINED_
#define _WCTRANS_T_DEFINED_
typedef __wctrans_t wctrans_t;
#endif
#ifdef _BSD_WCTYPE_T_
typedef _BSD_WCTYPE_T_ wctype_t;
#undef _BSD_WCTYPE_T_
#ifndef _WCTYPE_T_DEFINED_
#define _WCTYPE_T_DEFINED_
typedef __wctype_t wctype_t;
#endif
#ifndef WEOF


Loading…
Cancel
Save