merge the formfield patch from ooo-build
[ooovba.git] / sal / osl / unx / backtrace.h
bloba295c87c18145b9ad03e729509d196afb066c837
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: backtrace.h,v $
10 * $Revision: 1.9 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
32 #if defined (SOLARIS) || (FREEBSD)
34 #ifdef __cplusplus
35 extern "C" {
36 #endif
38 /* backtrace function with same behaviour as defined in GNU libc */
40 int backtrace( void **buffer, int max_frames );
42 void backtrace_symbols_fd( void **buffer, int size, int fd );
44 /* no frame.h on FreeBSD */
45 #if defined FREEBSD
46 struct frame {
47 long arg0[8];
48 long arg1[6];
49 struct frame *fr_savfp;
50 long fr_savpc;
52 #endif
55 #ifdef __cplusplus
56 } /* extern "C" */
57 #endif
59 #endif /* defined SOLARIS || FREEBSD */
61 #if defined (LINUX) && defined (SPARC)
62 #ifdef __cplusplus
63 extern "C" {
64 #endif
66 /* backtrace function with same behaviour as defined in GNU libc */
68 int backtrace( void **buffer, int max_frames );
70 void backtrace_symbols_fd( void **buffer, int size, int fd );
72 /* no frame.h on linux sparc */
73 struct frame {
74 long arg0[8];
75 long arg1[6];
76 struct frame *fr_savfp;
77 long fr_savpc;
80 #ifdef __cplusplus
81 } /* extern "C" */
82 #endif
84 #endif /* defined LINUX && SPARC */
86 #if defined (MACOSX)
88 #ifdef __cplusplus
89 extern "C" {
90 #endif
92 /* backtrace function with same behaviour as defined in GNU libc */
94 int backtrace( void **buffer, int max_frames );
96 void backtrace_symbols_fd( void **buffer, int size, int fd );
98 #ifdef __cplusplus
99 } /* extern "C" */
100 #endif
102 #endif /* defined MACOSX */