/*  DO NOT EDIT THIS FILE.

    It has been auto-edited by fixincludes from:

	"/usr/include/stdio.h"

    This had to be done to correct non-standard usages in the
    original, manufacturer supplied header file.  */

#ifndef FIXINC_WRAP_STDIO_H_STDIO_STDARG_H
#define FIXINC_WRAP_STDIO_H_STDIO_STDARG_H 1

#define __need___va_list
#include <stdarg.h>
/* @(#) $Revision: ../hdr/stdio.h@@/main/r10dav/libc_dav/libc_dav_cpe/1 $ */
#ifndef _STDIO_INCLUDED
#define _STDIO_INCLUDED

#ifndef _SYS_STDSYMS_INCLUDED
#  include <sys/stdsyms.h>
#endif /* _SYS_STDSYMS_INCLUDED */

#include <sys/types.h>

#ifdef __cplusplus
extern "C" {
#endif

#ifdef _INCLUDE__STDC__

#  define _NFILE	60
#  define BUFSIZ	1024
#  define _DBUFSIZ	8192

/* buffer size for multi-character output to unbuffered files */
#  define _SBFSIZ	8

   typedef struct {
	int		 __cnt;
	unsigned char	*__ptr;
	unsigned char	*__base;
	unsigned short	 __flag;
	unsigned char 	 __fileL;		/* low byte of file desc */
	unsigned char 	 __fileH;		/* high byte of file desc */
   } FILE;

   typedef struct {
	int		 __cnt;
	unsigned char	*__ptr;
	unsigned char	*__base;
	unsigned short	 __flag;
	unsigned char 	 __fileL;		/* low byte of file desc */
	unsigned char 	 __fileH;		/* high byte of file desc */
	unsigned char	*__bufendp;		/* end of buffer */
	unsigned char	*__newbase;
	unsigned char	 __smbuf[_SBFSIZ+2*4];	/* small buffer */
#  ifdef _REENTRANT
	void		*__lock;		/* lock for thread safety */
#  else
	void		*__unused;
#  endif
   } _FILEX;

/*
 * _IOLBF means that a file's output will be buffered line by line
 * In addition to being flags, _IONBF, _IOLBF and _IOFBF are possible
 * vales for "type" in setvbuf
 */
#  define _IOFBF		0000000
#  define _IOREAD		0000001
#  define _IOWRT		0000002
#  define _IONBF		0000004
#  define _IOMYBUF		0000010
#  define _IOEOF		0000020
#  define _IOERR		0000040
#  define _IOLBF		0000200
#  define _IORW			0000400
#  define _IOEXT		0001000
#  define _IODUMMY		0002000 /* dummy file for doscan, doprnt */

#  ifndef NULL
#    define	NULL	0
#  endif /* NULL */

#  ifndef _SIZE_T
#    define _SIZE_T
     typedef unsigned int size_t;
#  endif /* _SIZE_T */

#  ifndef _FPOS64_T
#    define _FPOS64_T
#    if !defined(__STDC_32_MODE__)
       typedef int64_t fpos64_t; /* 32bit position inside a file */
#    endif
#  endif /* _FPOS64_T */

#  ifndef _FPOS_T
#    define _FPOS_T
#    ifdef _FILE64
       typedef int64_t fpos_t;      /* 64bit position inside a file */
#    else
       typedef int32_t fpos_t;      /* 32bit position inside a file */
#    endif
#  endif /* _FPOS_T */


#  ifdef __hp9000s300
     typedef char *__va_list;
#  endif /* __hp9000s300 */

#  ifdef __hp9000s800
     typedef double *__va_list;
#  endif /* __hp9000s800 */


#  ifndef SEEK_SET
#    define SEEK_SET 0
#    define SEEK_CUR 1
#    define SEEK_END 2
#  endif /* SEEK_SET */

#  define _P_tmpdir "/var/tmp/"

#  define L_tmpnam	(sizeof(_P_tmpdir) + 15)

#  ifndef TMP_MAX
#    define TMP_MAX 17576
#  endif /* TMP_MAX */

#  define FILENAME_MAX 	14
#  define FOPEN_MAX 	_NFILE

#  ifndef EOF
#    define	EOF	(-1)
#  endif /* EOF */
   
#  define	stdin	(&__iob[0])
#  define	stdout	(&__iob[1])
#  define	stderr	(&__iob[2])

   extern FILE __iob[];

#  if defined(__STDC__) || defined(__cplusplus)
     extern int remove(const char *);
#if !defined(_SVID3) || defined (_XPG4_EXTENDED)
     extern int rename(const char *, const char *);
#endif /* _SVID3 || _XPG4_EXTENDED */
     extern char *tmpnam(char *);
     extern int fclose(FILE *);
     extern int fflush(FILE *);
     extern void setbuf(FILE *, char *);
     extern int setvbuf(FILE *, char *, int, size_t);
     extern int fprintf(FILE *, const char *, ...);
     extern int fscanf(FILE *, const char *,...);
     extern int printf(const char *,...);
     extern int scanf(const char *,...);
     extern int sprintf(char *, const char *,...);
     extern int sscanf(const char *, const char *,...);
     extern int fgetc(FILE *);
     extern char *fgets(char *, int, FILE *);
     extern int fputc(int, FILE *);
     extern int fputs(const char *, FILE *);
     extern int getc(FILE *);
     extern int getchar(void);
     extern char *gets(char *);
     extern int putc(int, FILE *);
     extern int putchar(int);
     extern int puts(const char *);
     extern int ungetc(int, FILE *);
#   ifndef _FILE64
     extern FILE *tmpfile(void);
     extern int fgetpos(FILE *, fpos_t *);
     extern int fsetpos(FILE *, const fpos_t *);
     extern FILE *fopen(const char *, const char *);
     extern FILE *freopen(const char *, const char *, FILE *);
#   else
#    ifdef __cplusplus
        inline FILE *tmpfile(void);
        inline int fgetpos(FILE *, fpos_t *);
        inline int fsetpos(FILE *, const fpos_t *);
        inline FILE *fopen(const char *, const char *);
        inline FILE *freopen(const char *, const char *, FILE *);
#    else /* __cplusplus */
        static FILE *tmpfile(void);
        static int fgetpos(FILE *, fpos_t *);
        static int fsetpos(FILE *, const fpos_t *);
        static FILE *fopen(const char *, const char *);
        static FILE *freopen(const char *, const char *, FILE *);
#    endif /* __cplusplus */
#   endif /** !_FILE64 **/

     extern int fseek(FILE *, long int, int);
     extern long int ftell(FILE *);
     extern void rewind(FILE *);
     extern void clearerr(FILE *);
     extern int feof(FILE *);
     extern int ferror(FILE *);
     extern void perror(const char *);
#    ifdef _REENTRANT
       extern int getc_unlocked(FILE *);
       extern int getchar_unlocked(FILE *);
       extern int putc_unlocked(int, FILE *);
       extern int putchar_unlocked(int);
       extern void clearerr_unlocked(FILE *);
       extern int feof_unlocked(FILE *);
       extern int ferror_unlocked(FILE *);
#    endif /* _REENTRANT */
#  else /* not __STDC__ || __cplusplus */
     extern int remove();
#ifndef _SVID3
     extern int rename();
#endif /* _SVID3 */
     extern char *tmpnam();
     extern int fclose();
     extern int fflush();
#   ifndef _FILE64
     extern FILE *tmpfile();
     extern FILE *fopen();
     extern FILE *freopen();
     extern int fgetpos();
     extern int fsetpos();
#   else
     static FILE *tmpfile();
     static FILE *fopen();
     static FILE *freopen();
     static int fgetpos();
     static int fsetpos();
#   endif /** !_FILE64 **/
     extern void setbuf();
     extern int setvbuf();
     extern int fprintf();
     extern int fscanf();
     extern int printf();
     extern int scanf();
     extern int sprintf();
     extern int sscanf();
     extern int vprintf();
     extern int vfprintf();
     extern int vsprintf();
     extern int fgetc();
     extern char *fgets();
     extern int fputc();
     extern int fputs();
     extern int getc();
     extern int getchar();
     extern char *gets();
     extern int putc();
     extern int putchar();
     extern int puts();
     extern int ungetc();
     extern int fseek();
     extern int fsetpos();
     extern long int ftell();
     extern void rewind();
     extern void clearerr();
     extern int feof();
     extern int ferror();
     extern void perror();
#    ifdef _REENTRANT
       extern int getc_unlocked();
       extern int getchar_unlocked();
       extern int putc_unlocked();
       extern int putchar_unlocked();
       extern void clearerr_unlocked();
       extern int feof_unlocked();
       extern int ferror_unlocked();
#    endif /* _REENTRANT */
#  endif /* __STDC__ || __cplusplus */

#  ifdef _CLASSIC_ANSI_TYPES
     extern int fread();
     extern int fwrite();
#  else
#    if defined(__STDC__) || defined(__cplusplus)
       extern size_t fread(void *, size_t, size_t, FILE *);
       extern size_t fwrite(const void *, size_t, size_t, FILE *);
#    else /* not __STDC__ || __cplusplus */
       extern size_t fread();
       extern size_t fwrite();
#    endif /* else not __STDC__ || __cplusplus */
#  endif

/*
 * WARNING:  The following function declarations are provided solely
 *  for use in the macros found in this header file.  These are HP-UX
 *  specific routines used internally and direct use of these routines 
 *  is not supported.  These routines may be removed or significantly
 *  changed in future releases of HP-UX.
 */
#  if defined(__STDC__) || defined(__cplusplus)
     extern int __flsbuf(unsigned char, FILE *);
     extern int __filbuf(FILE *);
#  else /* not __STDC__ || __cplusplus */
     extern int __flsbuf();
     extern int __filbuf();
#  endif /* __STDC__ || __cplusplus */
  
#  ifndef __lint
#   ifdef _REENTRANT
      /*
       * The default for getc() and putc() are locked for compatibility with
       * POSIX P1003.4a.
       * By defining _STDIO_UNLOCK_CHAR_IO before including this
       * file, the default action is changed to unlocked putc and getc.
       * A file lock can still be placed around a block of putc's or getc's
       * regardless of the locking mode, and invoking the locked or
       * unlocked version directly always overrides the default action.
       */
#     define clearerr_unlocked(__p)	((void) ((__p)->__flag &= \
						~(_IOERR | _IOEOF)))
#     define feof_unlocked(__p)		((__p)->__flag & _IOEOF)
#     define ferror_unlocked(__p)	((__p)->__flag & _IOERR)

#     define getc_unlocked(__p)		(--(__p)->__cnt >= 0 ? \
						(int) *(__p)->__ptr++ : \
						__filbuf(__p))

#     define getchar_unlocked()		getc_unlocked(stdin)

#     define putc_unlocked(__c, __p)	(--(__p)->__cnt >= 0 ? \
			(int) (*(__p)->__ptr++ = (unsigned char) (__c)) : \
			__flsbuf((unsigned char) (__c), (__p)))

#     define putchar_unlocked(__c)	putc_unlocked((__c), stdout)

#     ifdef _STDIO_UNLOCK_CHAR_IO
#       define clearerr(__p)		clearerr_unlocked(__p)
#       define feof(__p)		feof_unlocked(__p)
#       define ferror(__p)		ferror_unlocked(__p)
#       define getc(__p)		getc_unlocked(__p)
#       define putc(__c,__p)		putc_unlocked(__c,__p)
#       define getchar()		getchar_unlocked()
#       define putchar(__c)		putchar_unlocked(__c)
#     endif /*_STDIO_UNLOCK_CHAR_IO */

#   else /* not _REENTRANT */

#    define clearerr(__p)	((void) ((__p)->__flag &= ~(_IOERR | _IOEOF)))
#    define feof(__p)	((__p)->__flag & _IOEOF)
#    define ferror(__p)	((__p)->__flag & _IOERR)
#    define getc(__p)     (--(__p)->__cnt >= 0 ? (int) *(__p)->__ptr++ : \
			__filbuf(__p))

#    define getchar()	getc(stdin)

#    define putc(__c, __p)	(--(__p)->__cnt >= 0 ? \
			(int) (*(__p)->__ptr++ = (unsigned char) (__c)) : \
			__flsbuf((unsigned char) (__c), (__p)))

#    define putchar(__c)	putc((__c), stdout)
#   endif /* _REENTRANT */
#  endif /* not __lint */
#endif /* _INCLUDE__STDC__ */

#ifdef _INCLUDE_POSIX_SOURCE
#  define L_ctermid	9
#  define L_cuserid	9

#  if defined(__STDC__) || defined(__cplusplus)
     extern char *ctermid(char *);
     extern int fileno(FILE *);
     extern FILE *fdopen(int, const char *);
#  else /* not __STDC */
     extern char *ctermid();
     extern int fileno();
     extern FILE *fdopen();
#  endif /* __STDC */
#endif /* _INCLUDE_POSIX_SOURCE */

#ifdef _INCLUDE_XOPEN_SOURCE
#  if !defined(_AES_SOURCE) || defined (_XPG4_EXTENDED)

#    ifdef __hp9000s300
#      ifndef _DUMMY_VA_LIST
#        define _DUMMY_VA_LIST
         typedef char *__not_va_list__;
#      endif  /* _DUMMY_VA_LIST */
#    endif /* __hp9000s300 */

#    ifdef __hp9000s800
#      ifndef _DUMMY_VA_LIST
#        define _DUMMY_VA_LIST
         typedef double *__not_va_list__;
#      endif  /* _DUMMY_VA_LIST */
#    endif /* __hp9000s800 */

     extern char *optarg;
     extern int opterr;
     extern int optind;
     extern int optopt;

#    ifdef _PROTOTYPES
       extern int getopt(int, char * const [], const char *);
       extern char *cuserid(char *);
#    else
       extern int getopt();
       extern char *cuserid();
#    endif /* _PROTOTYPES */
#  endif /* not _AES_SOURCE || _XPG4_EXTENDED */



#  define P_tmpdir 	_P_tmpdir

#  if defined(__STDC__) || defined(__cplusplus)
     extern int getw(FILE *);
     extern int putw(int, FILE *);
     extern int pclose(FILE *);
     extern FILE *popen(const char *, const char *);
     extern char *tempnam(const char *, const char *);
#  else /* not __STDC__ || __cplusplus */
     extern int getw();
     extern int putw();
     extern int pclose();
     extern FILE *popen();
     extern char *tempnam();
#  endif /* else not __STDC__ || __cplusplus */

#endif /* _INCLUDE_XOPEN_SOURCE */

#if !defined(NAME_MAX) && (defined(_SVID2) || defined(_SVID3))
#  define NAME_MAX   14		/* Max number of characters in a filename */
#endif /* !defined(NAME_MAX) && (defined(_SVID2) || defined(_SVID3)) */

/*
 * The following 3 functions, with prototypes, are defined here rather
 * than in the previous _INCLUDE__STDC__ section because the XPG4_EXTENDED
 * version uses __gnuc_va_list instead of __va_list, and "va_list" wasn't defined
 * until the preceding _INCLUDE_XOPEN_SOURCE section.
 */
#ifdef _INCLUDE__STDC__
# if defined(__STDC__) || defined(__cplusplus)
#   ifdef _XPG4_EXTENDED
     extern int vprintf(const char *, __gnuc_va_list);
     extern int vfprintf(FILE *, const char *, __gnuc_va_list);
     extern int vsprintf(char *, const char *, __gnuc_va_list);
#   else /* ! _XPG4_EXTENDED */
     extern int vprintf(const char *, __gnuc_va_list);
     extern int vfprintf(FILE *, const char *, __gnuc_va_list);
     extern int vsprintf(char *, const char *, __gnuc_va_list);
#   endif /* _XPG4_EXTENDED */
# endif /* __STDC__ || __cplusplus */
#endif /* _INCLUDE__STDC__ */

#ifdef _INCLUDE_HPUX_SOURCE

#  define _iob __iob

#  if defined(__STDC__) || defined(__cplusplus)
     extern int snprintf(char *, size_t, const char *, ...);
     extern int vsnprintf(char *, size_t, const char *, __gnuc_va_list);
#  else /* not __STDC__) || __cplusplus */
     extern int snprintf();
     extern int vsnprintf();
#  endif /* __STDC__) || __cplusplus */


#  if defined(__STDC__) || defined(__cplusplus)
     extern int vscanf(const char *, __gnuc_va_list);
     extern int vfscanf(FILE *, const char *, __gnuc_va_list);
     extern int vsscanf(char *, const char *, __gnuc_va_list);
     extern int fclose_unlocked(FILE *);
     extern int fflush_unlocked(FILE *);
     extern char *fgets_unlocked(char *, int, FILE *);
     extern int fputs_unlocked(const char *, FILE *);
     extern int setvbuf_unlocked(FILE *, char *, int, size_t);
     extern int puts_unlocked(const char *);
     extern int ungetc_unlocked(int, FILE *);
     extern int fseek_unlocked(FILE *, long int, int);
     extern long int ftell_unlocked(FILE *);
     extern void rewind_unlocked(FILE *);
     extern size_t fread_unlocked(void *, size_t, size_t, FILE *);
     extern size_t fwrite_unlocked(const void *, size_t, size_t, FILE *);
     extern void flockfile(FILE *);
     extern void funlockfile(FILE *);
     extern int fileno_unlocked(FILE *);
     extern int getw_unlocked(FILE *);
     extern int putw_unlocked(int, FILE *);

#  else /* not __STDC__ || __cplusplus */
     extern int vscanf();
     extern int vfscanf();
     extern int vsscanf();
     extern int fclose_unlocked();
     extern int fflush_unlocked();
     extern char *fgets_unlocked();
     extern int fputs_unlocked();
     extern int setvbuf_unlocked();
     extern int puts_unlocked();
     extern int ungetc_unlocked();
     extern int fseek_unlocked();
     extern long int ftell_unlocked();
     extern void rewind_unlocked();
     extern size_t fread_unlocked();
     extern size_t fwrite_unlocked();
     extern void flockfile();
     extern void funlockfile();
     extern int fileno_unlocked();
     extern int getw_unlocked();
     extern int putw_unlocked();
#  endif /* __STDC__ || __cplusplus */

   extern unsigned char *__bufendtab[];

#  define _cnt		__cnt
#  define _ptr		__ptr
#  define _base		__base
#  define _flag		__flag

#  define _bufend(__p) \
    (*(((__p)->__flag & _IOEXT)  ? &(((_FILEX *)(__p))->__bufendp)	\
				: &(__bufendtab[(__p) - __iob])))

#  define _bufsiz(__p)	(_bufend(__p) - (__p)->__base)
#endif /* _INCLUDE_HPUX_SOURCE */

/***
**** ftello() and fseeko() interfaces put in for
**** large files.
****/

#ifdef _LARGEFILE64_SOURCE
#	ifdef _PROTOTYPES
		extern off64_t ftello64(FILE *);
		extern long int fseeko64(FILE *, off64_t, int);
		extern int fgetpos64(FILE *, fpos64_t *);
		extern int fsetpos64(FILE *, const fpos64_t *);
		extern FILE *fopen64(const char *, const char *);
		extern FILE *freopen64(const char *, const char *, FILE *);
		extern FILE *tmpfile64(void);
#	else
		extern off64_t ftello64();
		extern long int fseeko64();
		extern int fgetpos64();
		extern int fsetpos64();
		extern FILE *fopen64();
		extern FILE *freopen64();
		extern FILE *tmpfile64();
#	endif /** Prototypes **/
#endif /** _LARGEFILE64_SOURCE **/

#ifdef _FILE64
#	ifdef _LARGEFILE_SOURCE
#		ifdef _PROTOTYPES
#                   ifdef __cplusplus
			inline off_t ftello(FILE *);
			inline long int fseeko(FILE *, off_t, int);
#                   else /* __cplusplus */
			static off_t ftello(FILE *);
			static long int fseeko(FILE *, off_t, int);
#                   endif /* __cplusplus */
#		else /** No Prototypes **/
			static off_t ftello();
			static long int fseeko();
#		endif /** Prototypes **/
#	endif /* _LARGEFILE_SOURCE */

#	ifdef _PROTOTYPES
		extern off64_t __ftello64(FILE *);
		extern long int __fseeko64(FILE *, off64_t, int);
		extern int __fgetpos64(FILE *, fpos_t *);
		extern int __fsetpos64(FILE *, const fpos_t *);
		extern FILE *__fopen64(const char *, const char *);
		extern FILE *__freopen64(const char *, const char *, FILE *);
		extern FILE *__tmpfile64(void);
#	else
		extern off64_t __ftello64();
		extern long int __fseeko64();
		extern int __fgetpos64();
		extern int __fsetpos64();
		extern FILE *__fopen64();
		extern FILE *__freopen64();
		extern FILE *__tmpfile64();
#	endif /** Prototypes **/

	/** Do Mapping **/
#	ifdef _LARGEFILE_SOURCE
#          ifdef _PROTOTYPES
#             ifdef __cplusplus
		 inline off_t ftello(FILE *a) {return __ftello64(a);}
		 inline long int fseeko(FILE *a, off_t b, int c) {return __fseeko64(a,b,c);}
#             else /* __cplusplus */
		 static off_t ftello(FILE *a) {return __ftello64(a);}
		 static long int fseeko(FILE *a, off_t b, int c) {return __fseeko64(a,b,c);}
#             endif /* __cplusplus */
#          else
              static off_t ftello(a) FILE *a ; {return __ftello64(a);}
              static long int fseeko(a,b,c) FILE *a; off_t b; {return __fseeko64(a,b,c);}
#          endif
#	endif /* _LARGEFILE_SOURCE */

#	ifdef _PROTOTYPES
#	   ifdef __cplusplus
		inline int fgetpos(FILE *a, fpos_t *b) {return __fgetpos64(a,b);}
		inline int fsetpos(FILE *a, const fpos_t *b) {return __fsetpos64(a,b);}
		inline FILE *fopen(const char *a, const char *b) {return __fopen64(a,b);}
		inline FILE *freopen(const char *a, const char *b, FILE *c) {return __freopen64(a,b,c);}
	        inline FILE *tmpfile(void)  {return __tmpfile64();}
#	   else /* __cplusplus */
		static int fgetpos(FILE *a, fpos_t *b) {return __fgetpos64(a,b);}
		static int fsetpos(FILE *a, const fpos_t *b) {return __fsetpos64(a,b);}
		static FILE *fopen(const char *a, const char *b) {return __fopen64(a,b);}
		static FILE *freopen(const char *a, const char *b, FILE *c) {return __freopen64(a,b,c);}
	        static FILE *tmpfile(void)  {return __tmpfile64();}
#	   endif /* __cplusplus */
#	else
		static int fgetpos(a,b) FILE *a; fpos_t *b; {return __fgetpos64(a,b);}
		static int fsetpos(a,b) FILE *a; fpos_t *b; {return __fsetpos64(a,b);}
		static FILE *fopen(a,b) char *a; char *b; {return __fopen64(a,b);}
		static FILE *freopen(a,b,c) char *a; char *b; FILE *c; {return __freopen64(a,b,c);}
	        static FILE *tmpfile()  {return __tmpfile64();}
#	endif /* _PROTOTYPES */

#else  /** ! _FILE64  **/
#	ifdef _LARGEFILE_SOURCE
#		ifdef _PROTOTYPES
			extern off_t ftello(FILE *);
			extern long int fseeko(FILE *, off_t, int);
#		else /** No Prototypes **/
			extern off_t ftello();
			extern long int fseeko();
#		endif /** Prototypes **/
#	endif /** _LARGEFILE_SOURCE **/
#endif /** _FILE64 **/


		

#ifdef __cplusplus
}
#endif

#endif /* _STDIO_INCLUDED */

#endif  /* FIXINC_WRAP_STDIO_H_STDIO_STDARG_H */
