2 * CDE - Common Desktop Environment
4 * Copyright (c) 1993-2012, The Open Group. All rights reserved.
6 * These libraries and programs are free software; you can
7 * redistribute them and/or modify them under the terms of the GNU
8 * Lesser General Public License as published by the Free Software
9 * Foundation; either version 2 of the License, or (at your option)
12 * These libraries and programs are distributed in the hope that
13 * they will be useful, but WITHOUT ANY WARRANTY; without even the
14 * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
15 * PURPOSE. See the GNU Lesser General Public License for more
18 * You should have received a copy of the GNU Lesser General Public
19 * License along with these libraries and programs; if not, write
20 * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
21 * Floor, Boston, MA 02110-1301 USA
23 /*%% (c) Copyright 1993, 1994 Hewlett-Packard Company */
24 /*%% (c) Copyright 1993, 1994 International Business Machines Corp. */
25 /*%% (c) Copyright 1993, 1994 Sun Microsystems, Inc. */
26 /*%% (c) Copyright 1993, 1994 Novell, Inc. */
27 /*%% $XConsortium: tt_port.h /main/3 1995/10/23 10:43:42 rswiston $ */
28 /* @(#)tt_port.h 1.12 93/09/07
32 * Routines for centralizing portability problems.
34 * Copyright (c) 1992 by Sun Microsystems, Inc.
37 #if !defined(_TT_PORT_H)
41 #include "tt_options.h"
43 // WCOREDUMP is a semi-useful BSDism which we use to print (core dumped)
44 // after subprocess termination messages. If it's not available,
45 // like on AIX, just suppress the message.
46 #if !defined(WCOREDUMP)
47 #define WCOREDUMP(x) (0)
51 #if defined(OPT_BSD_WAIT)
52 typedef union wait _Tt_wait_status;
54 typedef int _Tt_wait_status;
61 #include "util/tt_string.h"
62 #if defined(OPT_DEFINE_SIG_PF)
63 typedef void (*SIG_PF)(int);
66 #if defined(OPT_BUG_USL)
67 #if !defined(MNTTYPE_NFS)
68 #define MNTTYPE_NFS "nfs"
72 _Tt_string _tt_gethostname(void);
73 int _tt_getdtablesize(void);
74 int _tt_zoomdtablesize(void);
75 int _tt_restoredtablesize(void);
76 long _tt_gethostid(void);
77 int _tt_sigset(int sig, SIG_PF handler);
78 char *_tt_putenv(const char *variable, const char *value);
79 char *_tt_get_first_set_env_var(int i_num_names, ...);
80 int _tt_put_all_env_var (int i_num_names, const char* pc_val, ...);
81 void _tt_openlog(const char *prefix, int logopt, int facility);
84 // Log to sink, or use syslog() if sink is 0
86 void _tt_syslog(FILE *sink, int priority, const char *format, ...);
87 void _tt_vsyslog(FILE *sink, int priority, const char *format, va_list args);