~ubuntu-branches/ubuntu/vivid/gzip/vivid

« back to all changes in this revision

Viewing changes to lib/stdio-impl.h

  • Committer: Steve Langasek
  • Date: 2012-06-29 02:07:40 UTC
  • mfrom: (4.1.9 sid)
  • Revision ID: steve.langasek@canonical.com-20120629020740-qqikrblzana08v2y
Merge version 1.5-1.1 from Debian

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/* Implementation details of FILE streams.
2
 
   Copyright (C) 2007-2010 Free Software Foundation, Inc.
 
2
   Copyright (C) 2007-2008, 2010-2012 Free Software Foundation, Inc.
3
3
 
4
4
   This program is free software: you can redistribute it and/or modify
5
5
   it under the terms of the GNU General Public License as published by
21
21
 
22
22
/* BSD stdio derived implementations.  */
23
23
 
 
24
#if defined __NetBSD__                         /* NetBSD */
 
25
/* Get __NetBSD_Version__.  */
 
26
# include <sys/param.h>
 
27
#endif
 
28
 
 
29
#include <errno.h>                             /* For detecting Plan9.  */
 
30
 
24
31
#if defined __sferror || defined __DragonFly__ /* FreeBSD, NetBSD, OpenBSD, DragonFly, MacOS X, Cygwin */
25
32
 
26
33
# if defined __DragonFly__          /* DragonFly */
50
57
#  define fp_ fp
51
58
# endif
52
59
 
53
 
# if defined __NetBSD__ || defined __OpenBSD__ /* NetBSD, OpenBSD */
 
60
# if (defined __NetBSD__ && __NetBSD_Version__ >= 105270000) || defined __OpenBSD__ /* NetBSD >= 1.5ZA, OpenBSD */
54
61
  /* See <http://cvsweb.netbsd.org/bsdweb.cgi/src/lib/libc/stdio/fileext.h?rev=HEAD&content-type=text/x-cvsweb-markup>
55
62
     and <http://www.openbsd.org/cgi-bin/cvsweb/src/lib/libc/stdio/fileext.h?rev=HEAD&content-type=text/x-cvsweb-markup> */
56
63
  struct __sfileext
59
66
      /* More fields, not relevant here.  */
60
67
    };
61
68
#  define fp_ub ((struct __sfileext *) fp->_ext._base)->_ub
62
 
# else                                         /* FreeBSD, DragonFly, MacOS X, Cygwin */
 
69
# else                                         /* FreeBSD, NetBSD <= 1.5Z, DragonFly, MacOS X, Cygwin */
63
70
#  define fp_ub fp_->_ub
64
71
# endif
65
72
 
70
77
 
71
78
/* SystemV derived implementations.  */
72
79
 
 
80
#ifdef __TANDEM                     /* NonStop Kernel */
 
81
# ifndef _IOERR
 
82
/* These values were determined by the program 'stdioext-flags' at
 
83
   <http://lists.gnu.org/archive/html/bug-gnulib/2010-12/msg00165.html>.  */
 
84
#  define _IOERR   0x40
 
85
#  define _IOREAD  0x80
 
86
#  define _IOWRT    0x4
 
87
#  define _IORW   0x100
 
88
# endif
 
89
#endif
 
90
 
73
91
#if defined _IOERR
74
92
 
75
93
# if defined __sun && defined _LP64 /* Solaris/{SPARC,AMD64} 64-bit */