1 /*%% (c) Copyright 1993, 1994 Hewlett-Packard Company */
2 /*%% (c) Copyright 1993, 1994 International Business Machines Corp. */
3 /*%% (c) Copyright 1993, 1994 Sun Microsystems, Inc. */
4 /*%% (c) Copyright 1993, 1994 Novell, Inc. */
5 /*%% $XConsortium: tt_port.h /main/3 1995/10/23 10:43:42 rswiston $ */
6 /* @(#)tt_port.h 1.12 93/09/07
10 * Routines for centralizing portability problems.
12 * Copyright (c) 1992 by Sun Microsystems, Inc.
15 #if !defined(_TT_PORT_H)
19 #include "tt_options.h"
21 // WCOREDUMP is a semi-useful BSDism which we use to print (core dumped)
22 // after subprocess termination messages. If it's not available,
23 // like on AIX, just suppress the message.
24 #if !defined(WCOREDUMP)
25 #define WCOREDUMP(x) (0)
29 #if defined(OPT_BSD_WAIT)
30 typedef union wait _Tt_wait_status;
32 typedef int _Tt_wait_status;
39 #include "util/tt_string.h"
40 #if defined(OPT_DEFINE_SIG_PF)
41 typedef void (*SIG_PF)(int);
44 #if defined(OPT_BUG_USL) || defined(OPT_BUG_UXP)
45 #if !defined(MNTTYPE_NFS)
46 #define MNTTYPE_NFS "nfs"
50 _Tt_string _tt_gethostname(void);
51 int _tt_getdtablesize(void);
52 int _tt_zoomdtablesize(void);
53 int _tt_restoredtablesize(void);
54 long _tt_gethostid(void);
55 int _tt_sigset(int sig, SIG_PF handler);
56 char *_tt_putenv(const char *variable, const char *value);
57 char *_tt_get_first_set_env_var(int i_num_names, ...);
58 int _tt_put_all_env_var (int i_num_names, const char* pc_val, ...);
59 void _tt_openlog(const char *prefix, int logopt, int facility);
62 // Log to sink, or use syslog() if sink is 0
64 void _tt_syslog(FILE *sink, int priority, const char *format, ...);
65 void _tt_vsyslog(FILE *sink, int priority, const char *format, va_list args);