From: Daniel Berger Date: 2003-10-31T23:44:46+09:00 Subject: Re: 64-bit Ruby on Solaris? ts wrote: > > >>>>> "D" == Daniel Berger writes: > > D> Ok - below is the stdio.h file. Please let me know what else you need. > > It's best if you give also stdio_impl.h (if it exist) > > Guy Decoux Ok - I've attached 3 stdio files, including stdio_impl.h, in case it's best to have them all handy. Regards, Dan /* * Copyright (c) 1998, by Sun Microsystems, Inc. * All rights reserved. */ /* * Extensions to the stdio package */ #ifndef _STDIO_EXT_H #define _STDIO_EXT_H #pragma ident "@(#)stdio_ext.h 1.2 99/06/10 SMI" #include #ifdef __cplusplus extern "C" { #endif /* * Even though the contents of the stdio FILE structure have always been * private to the stdio implementation, over the years some programs have * needed to get information about a stdio stream that was not accessible * through a supported interface. These programs have resorted to accessing * fields of the FILE structure directly, rendering them possibly non-portable * to new implementations of stdio, or more likely, preventing enhancements * to stdio because those programs will break. * * In the 64-bit world, the FILE structure is opaque. The routines here * are provided as a way to get the information that used to be retrieved * directly from the FILE structure. They are based on the needs of * existing programs (such as 'mh' and 'emacs'), so they may be extended * as other programs are ported. Though they may still be non-portable to * other operating systems, they will work from each Solaris release to * the next. More portable interfaces are being developed. */ #define FSETLOCKING_QUERY 0 #define FSETLOCKING_INTERNAL 1 #define FSETLOCKING_BYCALLER 2 extern size_t __fbufsize(FILE *stream); extern int __freading(FILE *stream); extern int __fwriting(FILE *stream); extern int __freadable(FILE *stream); extern int __fwritable(FILE *stream); extern int __flbf(FILE *stream); extern void __fpurge(FILE *stream); extern size_t __fpending(FILE *stream); extern void _flushlbf(void); extern int __fsetlocking(FILE *stream, int type); #ifdef __cplusplus } #endif #endif /* _STDIO_EXT_H */ /* * Copyright (c) 1998-2001 by Sun Microsystems, Inc. * All rights reserved. */ #ifndef _STDIO_IMPL_H #define _STDIO_IMPL_H #pragma ident "@(#)stdio_impl.h 1.13 01/11/16 SMI" #include #ifdef __cplusplus extern "C" { #endif #ifndef _SSIZE_T #define _SSIZE_T #if defined(_LP64) || defined(_I32LPx) typedef long ssize_t; /* size of something in bytes or -1 */ #else typedef int ssize_t; /* (historical version) */ #endif #endif /* !_SSIZE_T */ #ifdef _LP64 #ifndef _FILE64_H struct __FILE_TAG { long __pad[16]; }; #endif /* _FILE64_H */ #else struct __FILE_TAG /* needs to be binary-compatible with old versions */ { #ifdef _STDIO_REVERSE unsigned char *_ptr; /* next character from/to here in buffer */ ssize_t _cnt; /* number of available characters in buffer */ #else ssize_t _cnt; /* number of available characters in buffer */ unsigned char *_ptr; /* next character from/to here in buffer */ #endif unsigned char *_base; /* the buffer */ unsigned char _flag; /* the state of the stream */ unsigned char _file; /* UNIX System file descriptor */ unsigned __orientation:2; /* the orientation of the stream */ unsigned __ionolock:1; /* turn off implicit locking */ unsigned __seekable:1; /* is file seekable? */ unsigned __filler:4; }; #endif /* _LP64 */ #ifdef __cplusplus } #endif #endif /* _STDIO_IMPL_H */ /* * Copyright (c) 1998 by Sun Microsystems, Inc. * All rights reserved. */ #ifndef _STDIO_TAG_H #define _STDIO_TAG_H #pragma ident "@(#)stdio_tag.h 1.3 98/04/20 SMI" #ifdef __cplusplus extern "C" { #endif #ifndef __FILE_TAG #if defined(__cplusplus) && (__cplusplus < 54321L) #define __FILE_TAG FILE #else #define __FILE_TAG __FILE #endif typedef struct __FILE_TAG __FILE; #endif #ifdef __cplusplus } #endif #endif /* _STDIO_TAG_H */