2002-06-26 00:55:47 +08:00
|
|
|
// Specific definitions for HPUX -*- C++ -*-
|
2000-12-06 11:23:34 +08:00
|
|
|
|
2002-06-26 00:55:47 +08:00
|
|
|
// Copyright (C) 2000, 2002 Free Software Foundation, Inc.
|
2000-12-06 11:23:34 +08:00
|
|
|
//
|
|
|
|
// This file is part of the GNU ISO C++ Library. This library is free
|
|
|
|
// software; you can redistribute it and/or modify it under the
|
|
|
|
// terms of the GNU General Public License as published by the
|
|
|
|
// Free Software Foundation; either version 2, or (at your option)
|
|
|
|
// any later version.
|
|
|
|
|
|
|
|
// This library is distributed in the hope that it will be useful,
|
|
|
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
// GNU General Public License for more details.
|
|
|
|
|
|
|
|
// You should have received a copy of the GNU General Public License along
|
|
|
|
// with this library; see the file COPYING. If not, write to the Free
|
|
|
|
// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
|
|
|
// USA.
|
|
|
|
|
|
|
|
// As a special exception, you may use this file as part of a free software
|
|
|
|
// library without restriction. Specifically, if other files instantiate
|
|
|
|
// templates or use macros or inline functions from this file, or you compile
|
|
|
|
// this file and link it with other files to produce an executable, this
|
|
|
|
// file does not by itself cause the resulting executable to be covered by
|
|
|
|
// the GNU General Public License. This exception does not however
|
|
|
|
// invalidate any other reasons why the executable file might be covered by
|
|
|
|
// the GNU General Public License.
|
|
|
|
|
|
|
|
#ifndef _GLIBCPP_OS_DEFINES
|
2002-06-26 00:55:47 +08:00
|
|
|
#define _GLIBCPP_OS_DEFINES 1
|
2000-12-06 11:23:34 +08:00
|
|
|
|
2001-10-24 05:40:31 +08:00
|
|
|
// System-specific #define, typedefs, corrections, etc, go here. This
|
|
|
|
// file will come before all others.
|
2000-12-06 11:23:34 +08:00
|
|
|
|
|
|
|
#define __off_t off_t
|
|
|
|
#define __off64_t off64_t
|
|
|
|
#define __ssize_t ssize_t
|
|
|
|
|
2002-05-01 03:50:29 +08:00
|
|
|
// Use macro form of ctype functions to ensure __SB_masks is defined.
|
|
|
|
#define _SB_CTYPE_MACROS 1
|
|
|
|
|
2001-12-22 08:42:46 +08:00
|
|
|
/* HP-UX, for reasons unknown choose to use a different name for
|
|
|
|
the string to [unsigned] long long conversion routines.
|
|
|
|
|
|
|
|
Furthermore, instead of having the prototypes in stdlib.h like
|
|
|
|
everyone else, they put them into a non-standard header
|
|
|
|
<inttypes.h>. Ugh.
|
|
|
|
|
|
|
|
<inttypes.h> defines a variety of things, some of which we
|
2001-12-24 09:45:29 +08:00
|
|
|
probably do not want. So we don't want to include it here.
|
2001-12-22 08:42:46 +08:00
|
|
|
|
2001-12-24 09:45:29 +08:00
|
|
|
Luckily we can just declare strtoll and strtoull with the
|
|
|
|
__asm extension which effectively renames calls at the
|
|
|
|
source level without namespace pollution.
|
|
|
|
|
|
|
|
Also note that the compiler defines _INCLUDE_LONGLONG for C++
|
|
|
|
unconditionally, which makes intmax_t and uintmax_t long long
|
|
|
|
types.
|
2001-12-22 08:42:46 +08:00
|
|
|
|
|
|
|
We also force _GLIBCPP_USE_LONG_LONG here so that we don't have
|
|
|
|
to bastardize configure to deal with this sillyness. */
|
2002-06-26 00:55:47 +08:00
|
|
|
namespace std
|
|
|
|
{
|
2002-04-13 06:31:27 +08:00
|
|
|
#ifndef __LP64__
|
2002-01-04 02:03:15 +08:00
|
|
|
__extension__ extern "C" long long strtoll (const char *, char **, int)
|
2001-12-23 00:51:55 +08:00
|
|
|
__asm ("__strtoll");
|
2002-01-04 02:03:15 +08:00
|
|
|
__extension__ extern "C" unsigned long long strtoull (const char *, char **, int)
|
2001-12-23 00:51:55 +08:00
|
|
|
__asm ("__strtoull");
|
2002-04-13 06:31:27 +08:00
|
|
|
#else
|
|
|
|
__extension__ extern "C" long long strtoll (const char *, char **, int)
|
|
|
|
__asm ("strtol");
|
|
|
|
__extension__ extern "C" unsigned long long strtoull (const char *, char **, int)
|
|
|
|
__asm ("strtoul");
|
|
|
|
#endif
|
2001-12-23 00:51:55 +08:00
|
|
|
}
|
2002-06-26 00:55:47 +08:00
|
|
|
|
2001-12-22 08:42:46 +08:00
|
|
|
#define _GLIBCPP_USE_LONG_LONG 1
|
2002-06-26 00:55:47 +08:00
|
|
|
|
|
|
|
// HPUX on IA64 requires vtable to be 64 bit aligned even at 32 bit
|
|
|
|
// mode. We need to pad the vtable structure to achieve this.
|
|
|
|
#if !defined(_LP64) && defined (__ia64__)
|
|
|
|
#define _GLIBCPP_VTABLE_PADDING 8
|
|
|
|
typedef long int __padding_type;
|
|
|
|
#endif
|
|
|
|
|
2002-11-14 06:36:39 +08:00
|
|
|
/* We need explicit instantiation of the atomicity lock on HPPA if
|
|
|
|
there is no weak support. */
|
|
|
|
#if !defined(_GLIBCPP_SUPPORTS_WEAK) && defined (__hppa__)
|
2002-11-06 03:17:37 +08:00
|
|
|
#define _GLIBCPP_INST_ATOMICITY_LOCK 1
|
|
|
|
#endif
|
2001-08-10 02:01:36 +08:00
|
|
|
#endif
|