os_defines.h revision 132720
1279377Simp// Specific definitions for IRIX  -*- C++ -*-
2279377Simp
3279377Simp// Copyright (C) 2000, 2002 Free Software Foundation, Inc.
4279377Simp//
5279377Simp// This file is part of the GNU ISO C++ Library.  This library is free
6279377Simp// software; you can redistribute it and/or modify it under the
7279377Simp// terms of the GNU General Public License as published by the
8279377Simp// Free Software Foundation; either version 2, or (at your option)
9279377Simp// any later version.
10279377Simp
11279377Simp// This library is distributed in the hope that it will be useful,
12279377Simp// but WITHOUT ANY WARRANTY; without even the implied warranty of
13279377Simp// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14279377Simp// GNU General Public License for more details.
15279377Simp
16279377Simp// You should have received a copy of the GNU General Public License along
17279377Simp// with this library; see the file COPYING.  If not, write to the Free
18279377Simp// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
19279377Simp// USA.
20279377Simp
21279377Simp// As a special exception, you may use this file as part of a free software
22279377Simp// library without restriction.  Specifically, if other files instantiate
23279377Simp// templates or use macros or inline functions from this file, or you compile
24279377Simp// this file and link it with other files to produce an executable, this
25279377Simp// file does not by itself cause the resulting executable to be covered by
26279377Simp// the GNU General Public License.  This exception does not however
27279377Simp// invalidate any other reasons why the executable file might be covered by
28279377Simp// the GNU General Public License.
29279377Simp
30279377Simp#ifndef _GLIBCXX_OS_DEFINES
31279377Simp#define _GLIBCXX_OS_DEFINES 1
32279377Simp
33279377Simp// System-specific #define, typedefs, corrections, etc, go here.  This
34279377Simp// file will come before all others.
35279377Simp
36279377Simp// We need large file support.  There are two ways to turn it on: by
37279377Simp// defining either _LARGEFILE64_SOURCE or _SGI_SOURCE.  However, it
38279377Simp// does not actually work to define only the former, as then
39279377Simp// <sys/stat.h> is invalid: `st_blocks' is defined to be a macro, but
40279377Simp// then used as a field name.  So, we have to turn on _SGI_SOURCE.
41279377Simp// That only works if _POSIX_SOURCE is turned off, so we have to
42279377Simp// explicitly turn it off.  (Some of the libio C files explicitly try
43279377Simp// to turn it on.)  _SGI_SOURCE is actually turned on implicitly via
44279377Simp// the command-line.
45279377Simp#undef _POSIX_SOURCE
46279377Simp
47279377Simp#define __off_t off_t
48279377Simp#define __off64_t off64_t
49279377Simp#define __ssize_t ssize_t
50279377Simp
51279377Simp// GCC does not use thunks on IRIX.
52279377Simp#define _G_USING_THUNKS 0
53279377Simp
54279377Simp// FINOREAD takes an "off_t *" as argument.
55279377Simp#define _GLIBCXX_FIONREAD_TAKES_OFF_T
56279377Simp
57279377Simp#endif
58279377Simp
59279377Simp