mirror of
git://git.code.sf.net/p/cdesktopenv/code
synced 2025-03-09 15:50:02 +00:00
Tooltalk fixes for OpenBSD. This consists mainly of #ifdefs, casts and some small type nits.
This commit is contained in:
parent
3d5a492038
commit
3b77d7c065
39 changed files with 129 additions and 62 deletions
|
@ -35,7 +35,7 @@
|
|||
#include "tt_options.h"
|
||||
#include <errno.h>
|
||||
#include <string.h>
|
||||
#if defined(__osf__) || defined(linux)
|
||||
#if defined(__osf__) || defined(linux) || defined(CSRG_BASED)
|
||||
#include <unistd.h>
|
||||
#else
|
||||
#if !defined(USL) && !defined(__uxp__)
|
||||
|
|
|
@ -35,7 +35,7 @@
|
|||
#include "tt_options.h"
|
||||
#include <errno.h>
|
||||
#include <string.h>
|
||||
#if defined(__osf__) || defined(linux)
|
||||
#if defined(__osf__) || defined(linux) || defined(CSRG_BASED)
|
||||
#include <unistd.h>
|
||||
#else
|
||||
#if !defined(USL) && !defined(__uxp__)
|
||||
|
|
|
@ -91,7 +91,11 @@ typedef union
|
|||
*/
|
||||
#undef MAXINT
|
||||
#endif
|
||||
#if defined(CSRG_BASED)
|
||||
#define MAXINT INT_MAX
|
||||
#else
|
||||
#include <values.h>
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
|
|
|
@ -41,6 +41,7 @@
|
|||
#include <sys/stat.h>
|
||||
#include <sys/param.h>
|
||||
#include <errno.h>
|
||||
#include <stdint.h>
|
||||
#include <unistd.h>
|
||||
#include <nl_types.h>
|
||||
|
||||
|
@ -2773,7 +2774,7 @@ _tt_run_garbage_collect(int in_parallel)
|
|||
}
|
||||
} else {
|
||||
#endif /* OPT_AUTO_GARBAGE_COLLECT*/
|
||||
exit((int)_tt_garbage_collect(NULL));
|
||||
exit((intptr_t)_tt_garbage_collect(NULL));
|
||||
#if defined(OPT_AUTO_GARBAG_COLLECT)
|
||||
}
|
||||
#endif /* OPT_AUTO_GARBAGE_COLLECT*/
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
#include <stdlib.h>
|
||||
#include <sys/param.h>
|
||||
#include <sys/stat.h>
|
||||
#if defined(__osf__) || defined(linux)
|
||||
#if defined(__osf__) || defined(linux) || defined(CSRG_BASED)
|
||||
#include <unistd.h>
|
||||
#else
|
||||
#if !defined(USL) && !defined(__uxp__)
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
*/
|
||||
|
||||
#include <errno.h>
|
||||
#if defined(__osf__) || defined(linux)
|
||||
#if defined(__osf__) || defined(linux) || defined(CSRG_BASED)
|
||||
#include <unistd.h>
|
||||
#else
|
||||
#ifndef USL
|
||||
|
@ -230,7 +230,7 @@ pathlist_lstt_dearchive(
|
|||
(char *)our_process_name, (int)obj_kind );
|
||||
return FALSE;
|
||||
}
|
||||
if (verbosity && ( (last_path != this_path)
|
||||
if (verbosity && ( (last_path != (const char *)this_path)
|
||||
|| (obj_kind == ARCHIVE_END)))
|
||||
{
|
||||
if (last_path_valid) {
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
*
|
||||
*/
|
||||
|
||||
#if defined(__osf__) || defined(linux)
|
||||
#if defined(__osf__) || defined(linux) || defined(CSRG_BASED)
|
||||
#include <unistd.h>
|
||||
#else
|
||||
#if defined (USL) || defined(__uxp__)
|
||||
|
|
|
@ -742,8 +742,12 @@ _tt_errno_status(
|
|||
case EPIPE: return TT_DESKTOP_EPIPE;
|
||||
case ENOMSG: return TT_DESKTOP_ENOMSG;
|
||||
case EDEADLK: return TT_DESKTOP_EDEADLK;
|
||||
#ifdef ENODATA
|
||||
case ENODATA: return TT_DESKTOP_ENODATA;
|
||||
#endif
|
||||
#ifdef EPROTO
|
||||
case EPROTO: return TT_DESKTOP_EPROTO;
|
||||
#endif
|
||||
#if !defined(OPT_BUG_AIX)
|
||||
// on AIX, ENOTEMPTY is the same code as EEXIST, and the switch
|
||||
// statement fails to compile with duplicate case labels..
|
||||
|
|
|
@ -59,7 +59,7 @@ is_empty() const
|
|||
|
||||
// check the list for all NULL content member tt_strings
|
||||
_Tt_string_list_cursor values_cursor(values);
|
||||
while (values_cursor.next()) if (*values_cursor != (char*)NULL) return FALSE;
|
||||
while (values_cursor.next()) if (*values_cursor != (const char*)NULL) return FALSE;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
|
|
@ -284,13 +284,13 @@ startup_ttsession(_Tt_string &start_ttcmd)
|
|||
|
||||
istat = signal(SIGINT, SIG_IGN);
|
||||
qstat = signal(SIGQUIT, SIG_IGN);
|
||||
cstat = signal(SIGCLD, SIG_DFL);
|
||||
cstat = signal(SIGCHLD, SIG_DFL);
|
||||
|
||||
w = waitpid(pid, &status, 0);
|
||||
|
||||
(void) signal(SIGINT, istat);
|
||||
(void) signal(SIGQUIT, qstat);
|
||||
(void) signal(SIGCLD, cstat);
|
||||
(void) signal(SIGCHLD, cstat);
|
||||
|
||||
return((w == -1)? w: status);
|
||||
|
||||
|
|
|
@ -47,7 +47,7 @@
|
|||
#include <sys/ioctl.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/time.h>
|
||||
#if defined(__STDC__) && !defined(linux)
|
||||
#if defined(__STDC__) && !defined(linux) && !defined(CSRG_BASED)
|
||||
extern "C" { extern int ioctl (int, int, ...) ; };
|
||||
#endif
|
||||
#include "util/tt_global_env.h"
|
||||
|
|
|
@ -118,7 +118,7 @@ base_constructor()
|
|||
|
||||
_Tt_message::
|
||||
_Tt_message()
|
||||
#if defined(linux)
|
||||
#if defined(linux) || defined(CSRG_BASED)
|
||||
: _pattern_id(), _object(), _file(), _op(),
|
||||
_otype(), _sender_ptype(), _handler_ptype(),
|
||||
_api_id(), _status_string()
|
||||
|
|
|
@ -560,6 +560,36 @@
|
|||
# define OPT_BUG_RPCINTR
|
||||
# undef OPT_XTHREADS
|
||||
|
||||
#elif defined(__OpenBSD__)
|
||||
|
||||
# undef OPT_UNIX_SOCKET_RPC
|
||||
# undef OPT_TLI
|
||||
# undef OPT_DLOPEN_X11
|
||||
# undef OPT_DLOPEN_CE
|
||||
# undef OPT_ADDMSG_DIRECT
|
||||
# undef OPT_SECURE_RPC
|
||||
# undef OPT_CLASSING_ENGINE
|
||||
# undef OPT_PATCH
|
||||
# define OPT_POSIX_SIGNAL
|
||||
# undef OPT_BSD_WAIT
|
||||
# undef OPT_DGETTEXT
|
||||
# define OPT_CATGETS
|
||||
# undef OPT_GETDTABLESIZE
|
||||
# undef OPT_SYSINFO
|
||||
# define OPT_CPP_PATH "/usr/libexec/cpp"
|
||||
# define OPT_CPP_OPTIONS ""
|
||||
# define OPT_STRERROR
|
||||
# undef OPT_SVR4_GETMNTENT
|
||||
# undef OPT_LOCKF_MNTENT
|
||||
# define OPT_LOCAL_MOUNT_TYPE MNTTYPE_UFS
|
||||
# undef OPT_OLD_RPC
|
||||
# define OPT_DEFINE_SIG_PF
|
||||
# define OPT_TAR_HAS_EXCLUDE_OPTION
|
||||
# define OPT_HAS_REALPATH
|
||||
# define OPT_AUTOMOUNT_PATH_FIX
|
||||
# define OPT_BUG_RPCINTR
|
||||
# undef OPT_XTHREADS
|
||||
|
||||
#else
|
||||
/* Unknown configuration, complain */
|
||||
}}}} You must edit lib/tt_options.h and add a section defining the options for your configuration.
|
||||
|
|
|
@ -679,7 +679,7 @@ _ttdt_GSet_Geometry(
|
|||
{
|
||||
Tt_message msg = _ttDesktopMessageCreate( commission, theClass,
|
||||
handler, op, _ttdt_Geometry_in_cb,
|
||||
callback, clientdata );
|
||||
(void *)callback, clientdata );
|
||||
Tt_status status = tt_ptr_error( msg );
|
||||
if (status != TT_OK) {
|
||||
return msg;
|
||||
|
@ -814,7 +814,7 @@ ttdt_Set_Geometry_pat(
|
|||
{
|
||||
return _ttdt_pat( TTDT_SET_GEOMETRY, _ttdt_Geometry_out_cb,
|
||||
category, commission,
|
||||
callback, clientdata, register_it );
|
||||
(void *)callback, clientdata, register_it );
|
||||
}
|
||||
|
||||
Tt_pattern
|
||||
|
@ -828,7 +828,7 @@ ttdt_Get_Geometry_pat(
|
|||
{
|
||||
return _ttdt_pat( TTDT_GET_GEOMETRY, _ttdt_Geometry_out_cb,
|
||||
category, commission,
|
||||
callback, clientdata, register_it );
|
||||
(void *)callback, clientdata, register_it );
|
||||
}
|
||||
|
||||
static int
|
||||
|
@ -953,7 +953,7 @@ _ttdt_GSet_Iconified(
|
|||
{
|
||||
Tt_message msg = _ttDesktopMessageCreate( commission, theClass,
|
||||
handler, op, _ttdt_Iconified_in_cb,
|
||||
callback, clientdata );
|
||||
(void *)callback, clientdata );
|
||||
Tt_status status = tt_ptr_error( msg );
|
||||
if (status != TT_OK) {
|
||||
return msg;
|
||||
|
@ -1048,7 +1048,7 @@ ttdt_Set_Iconified_pat(
|
|||
|
||||
return _ttdt_pat( TTDT_SET_ICONIFIED, _ttdt_Iconified_out_cb,
|
||||
category, commission,
|
||||
callback, clientdata, register_it );
|
||||
(void *)callback, clientdata, register_it );
|
||||
}
|
||||
|
||||
Tt_pattern
|
||||
|
@ -1062,7 +1062,7 @@ ttdt_Get_Iconified_pat(
|
|||
{
|
||||
return _ttdt_pat( TTDT_GET_ICONIFIED, _ttdt_Iconified_out_cb,
|
||||
category, commission,
|
||||
callback, clientdata, register_it );
|
||||
(void *)callback, clientdata, register_it );
|
||||
}
|
||||
|
||||
//
|
||||
|
@ -1226,7 +1226,7 @@ _ttdt_GSet_XInfo(
|
|||
{
|
||||
Tt_message msg = _ttDesktopMessageCreate( commission, theClass,
|
||||
handler, op, _ttdt_XInfo_in_cb,
|
||||
callback, clientdata );
|
||||
(void *)callback, clientdata );
|
||||
Tt_status status = tt_ptr_error( msg );
|
||||
if (status != TT_OK) {
|
||||
return msg;
|
||||
|
@ -1345,7 +1345,7 @@ ttdt_Set_XInfo_pat(
|
|||
{
|
||||
return _ttdt_pat( TTDT_SET_XINFO, _ttdt_XInfo_out_cb,
|
||||
category, commission,
|
||||
callback, clientdata, register_it );
|
||||
(void *)callback, clientdata, register_it );
|
||||
}
|
||||
|
||||
Tt_pattern
|
||||
|
@ -1359,7 +1359,7 @@ ttdt_Get_XInfo_pat(
|
|||
{
|
||||
return _ttdt_pat( TTDT_GET_XINFO, _ttdt_XInfo_out_cb,
|
||||
category, commission,
|
||||
callback, clientdata, register_it );
|
||||
(void *)callback, clientdata, register_it );
|
||||
}
|
||||
|
||||
//
|
||||
|
@ -1501,7 +1501,7 @@ ttdt_Get_Locale(
|
|||
}
|
||||
Tt_message msg = _ttDtPMessageCreate( commission, TT_REQUEST,
|
||||
TT_SESSION, handler,
|
||||
TTDT_GET_LOCALE, _ttDtGetLocaleCB, clientCB,
|
||||
TTDT_GET_LOCALE, _ttDtGetLocaleCB, (void *)clientCB,
|
||||
clientData );
|
||||
Tt_status status = tt_ptr_error( msg );
|
||||
if (status != TT_OK) {
|
||||
|
@ -1614,7 +1614,7 @@ ttdt_Get_Situation(
|
|||
Tt_message msg = _ttDtPMessageCreate( commission, TT_REQUEST,
|
||||
TT_SESSION, _handler,
|
||||
TTDT_GET_SITUATION, _ttDtGetSituationCB,
|
||||
clientCB, clientData );
|
||||
(void *)clientCB, clientData );
|
||||
Tt_status status = tt_ptr_error( msg );
|
||||
if (status != TT_OK) {
|
||||
return msg;
|
||||
|
@ -1661,7 +1661,7 @@ _ttdt_posix_cb(
|
|||
struct utsname names;
|
||||
char buf[ SYS_NMLN ];
|
||||
case TTDT_SET_LOCALE:
|
||||
return _ttDtGetLocaleCB( msg, pat, _ttDtApplyLocale, 0 );
|
||||
return _ttDtGetLocaleCB( msg, pat, (void *)_ttDtApplyLocale, 0 );
|
||||
case TTDT_GET_LOCALE:
|
||||
for (i = 0; i < numArgs/2; i++) {
|
||||
categoryName = _tttk_message_arg_val( msg, 2 * i, 0 );
|
||||
|
|
|
@ -115,7 +115,7 @@ _ttDtFileJoinPat(
|
|||
Tt_pattern pat = _ttDtPatternCreate( TT_OBSERVE, theScope,
|
||||
theScope != TT_FILE, pathname,
|
||||
TTDT_DELETED, _ttDtFileCB,
|
||||
cb, clientData, 0 );
|
||||
(void *)cb, clientData, 0 );
|
||||
Tt_status status = tt_ptr_error( pat );
|
||||
if (status != TT_OK) {
|
||||
return pat;
|
||||
|
@ -254,7 +254,7 @@ ttdt_file_request(
|
|||
)
|
||||
{
|
||||
Tt_message msg = _ttDtPMessageCreate( context, TT_REQUEST, theScope, 0,
|
||||
op, _ttDtFileCB, cb, clientData);
|
||||
op, _ttDtFileCB, (void *)cb, clientData);
|
||||
Tt_status status = tt_ptr_error( msg );
|
||||
if (status != TT_OK) {
|
||||
return msg;
|
||||
|
@ -298,7 +298,7 @@ _ttDtFileEventPat(
|
|||
Tt_pattern pat = _ttDtPatternCreate( TT_HANDLE, theScope,
|
||||
theScope != TT_FILE, pathname,
|
||||
TTDT_SAVE, _ttDtFileCB,
|
||||
cb, clientData, 0 );
|
||||
(void *)cb, clientData, 0 );
|
||||
Tt_status status = tt_ptr_error( pat );
|
||||
if (status != TT_OK) {
|
||||
return pat;
|
||||
|
|
|
@ -102,7 +102,7 @@ pats_create(
|
|||
pats[++i] = ttdt_Set_XInfo_pat( TT_HANDLE, contract,
|
||||
_ttdt_do_Set_XInfo, shell, 1 );
|
||||
pats[++i] = _ttdt_pat(TTDT_RAISE, _ttdt_contract_cb, TT_HANDLE,
|
||||
contract, _ttdt_do_RaiseLower, shell, 0 );
|
||||
contract, (void *)_ttdt_do_RaiseLower, shell, 0 );
|
||||
tt_pattern_op_add( pats[i], _ttDtOp( TTDT_LOWER ) );
|
||||
tt_pattern_session_add( pats[i], sess );
|
||||
tt_pattern_register( pats[i] );
|
||||
|
@ -126,7 +126,7 @@ pats_create(
|
|||
pats[++i] = ttdt_Set_XInfo_pat( TT_HANDLE, contract,
|
||||
(Ttdt_XInfo_in_cb)cb, clientData, 1 );
|
||||
pats[++i] = _ttdt_pat(TTDT_RAISE, _ttdt_contract_cb, TT_HANDLE,
|
||||
contract, cb, clientData, 0 );
|
||||
contract, (void *)cb, clientData, 0 );
|
||||
tt_pattern_op_add( pats[i], _ttDtOp( TTDT_LOWER ) );
|
||||
tt_pattern_session_add( pats[i], sess );
|
||||
tt_pattern_register( pats[i] );
|
||||
|
@ -145,17 +145,17 @@ pats_create(
|
|||
}
|
||||
}
|
||||
pats[++i] = _ttdt_pat( TTDT_QUIT, _ttdt_contract_cb, TT_HANDLE,
|
||||
contract, cb, _clientData, 1 );
|
||||
contract, (void *)cb, _clientData, 1 );
|
||||
pats[++i] = _ttdt_pat( TTDT_PAUSE, _ttdt_contract_cb, TT_HANDLE,
|
||||
contract, cb, (cb ? clientData : shell), 0 );
|
||||
contract, (void *)cb, (cb ? clientData : shell), 0 );
|
||||
tt_pattern_op_add( pats[i], _ttDtOp( TTDT_RESUME ));
|
||||
tt_pattern_session_add( pats[i], sess );
|
||||
tt_pattern_register( pats[i] );
|
||||
pats[++i] = _ttdt_pat( TTDT_GET_STATUS, _ttdt_contract_cb, TT_HANDLE,
|
||||
contract, cb, clientData, 1 );
|
||||
contract, (void *)cb, clientData, 1 );
|
||||
if (contract == 0) {
|
||||
pats[++i]= _ttdt_pat( TTDT_DO_COMMAND, _ttdt_contract_cb,
|
||||
TT_HANDLE, contract, cb, clientData, 1 );
|
||||
TT_HANDLE, contract, (void *)cb, clientData, 1 );
|
||||
pats[++i]= _ttdt_pat( TTDT_SET_LOCALE, _ttdt_posix_cb,
|
||||
TT_HANDLE, contract, 0, 0, 0 );
|
||||
tt_pattern_op_add( pats[i], _ttDtOp( TTDT_GET_LOCALE ));
|
||||
|
|
|
@ -381,7 +381,7 @@ ttmedia_Deposit_pat(
|
|||
{
|
||||
Tt_pattern pat = _ttDtPatternCreate( category, TT_SESSION,
|
||||
register_it, 0, TTME_DEPOSIT,
|
||||
_ttMediaLoadMsgCB, clientcb,
|
||||
_ttMediaLoadMsgCB, (void *)clientcb,
|
||||
clientdata, 0 );
|
||||
Tt_status status = tt_ptr_error( pat );
|
||||
if (status != TT_OK) {
|
||||
|
@ -418,7 +418,7 @@ ttmedia_load(
|
|||
)
|
||||
{
|
||||
Tt_message msg = _ttDtPMessageCreate( context, TT_REQUEST, TT_SESSION,
|
||||
0, op, _ttMediaLoadMsgCB, cb, clientData );
|
||||
0, op, _ttMediaLoadMsgCB, (void *)cb, clientData );
|
||||
Tt_status status = tt_ptr_error( msg );
|
||||
if (status != TT_OK) {
|
||||
return msg;
|
||||
|
|
|
@ -365,7 +365,7 @@ ttdt_subcontract_manage(
|
|||
(Ttdt_XInfo_out_cb)cb, clientData, 1 );
|
||||
}
|
||||
pats[2] = _ttdt_pat( TTDT_STATUS, _ttdt_contract_cb, TT_OBSERVE,
|
||||
subcontract, cb, clientData, 1 );
|
||||
subcontract, (void *)cb, clientData, 1 );
|
||||
pats[ numPats - 1 ] = 0;
|
||||
for (int i = 0; i < numPats; i++) {
|
||||
Tt_status status = tt_ptr_error( pats[ i ] );
|
||||
|
|
|
@ -169,7 +169,7 @@ _ttDtPMessageCreate(
|
|||
return msg;
|
||||
}
|
||||
_TttkItem2Free fuse( msg );
|
||||
status = tt_message_user_set( msg, _TttkCBKey, cb );
|
||||
status = tt_message_user_set( msg, _TttkCBKey, (void *)cb );
|
||||
if (status != TT_OK) {
|
||||
return (Tt_message)tt_error_pointer( status );
|
||||
}
|
||||
|
|
|
@ -161,7 +161,7 @@ _ttDtPatternCreate(
|
|||
if (status != TT_OK) {
|
||||
return (Tt_pattern)tt_error_pointer( status );
|
||||
}
|
||||
status = tt_pattern_user_set( pat, _TttkCBKey, cb );
|
||||
status = tt_pattern_user_set( pat, _TttkCBKey, (void *)cb );
|
||||
if (status != TT_OK) {
|
||||
return (Tt_pattern)tt_error_pointer( status );
|
||||
}
|
||||
|
|
|
@ -82,13 +82,16 @@
|
|||
# define ttFsName(e) vmt2dataptr(e,VMT_OBJECT)
|
||||
# define ttMountPt(e) vmt2dataptr(e,VMT_STUB)
|
||||
# define ttCloseMntTbl(f) free(tmpbuf)
|
||||
#elif defined(__osf__)
|
||||
#elif defined(__osf__) || defined(CSRG_BASED)
|
||||
# include <sys/types.h>
|
||||
# include <sys/mount.h>
|
||||
# ifdef __osf__
|
||||
extern "C" int getfsstat(struct statfs *, long, int);
|
||||
# endif
|
||||
# define MNTTYPE_NFS "nfs"
|
||||
# define ttOpenMntTbl(path,mode) ((FILE *) 1)
|
||||
# define TtMntEntry struct statfs *
|
||||
# ifdef __osf__
|
||||
# define ttFsType(e) \
|
||||
(((e)->f_type == MOUNT_UFS) ? "ufs" \
|
||||
: (((e)->f_type == MOUNT_NFS3) ? "nfs" \
|
||||
|
@ -96,6 +99,9 @@
|
|||
: (((e)->f_type == MOUNT_CDFS) ? "cdfs" \
|
||||
: (((e)->f_type == MOUNT_PROCFS) ? "procfs" \
|
||||
: "unknown")))))
|
||||
# elif defined(CSRG_BASED)
|
||||
# define ttFsType(e) (e->f_fstypename)
|
||||
# endif
|
||||
# define ttFsName(e) ((char *)((e)->f_mntfromname))
|
||||
# define ttMountPt(e) ((char *)((e)->f_mntonname))
|
||||
# define ttCloseMntTbl(f) free(buf)
|
||||
|
@ -460,7 +466,7 @@ updateFileSystemEntries ()
|
|||
|
||||
for (entry = (TtMntEntry)tmpbuf; rc > 0; --rc,
|
||||
entry = (TtMntEntry)((char *) entry + entry->vmt_length))
|
||||
#elif defined(__osf__)
|
||||
#elif defined(__osf__) || defined(CSRG_BASED)
|
||||
int numfs,i;
|
||||
struct statfs *buf;
|
||||
long bufsize;
|
||||
|
@ -496,7 +502,7 @@ updateFileSystemEntries ()
|
|||
#else
|
||||
while (entry = getmntent(mount_table))
|
||||
#endif
|
||||
#ifndef __osf__
|
||||
#if !defined(__osf__) && !defined(CSRG_BASED)
|
||||
{
|
||||
#endif
|
||||
fse = createFileSystemEntry( entry );
|
||||
|
|
|
@ -48,7 +48,7 @@ extern "C" in_addr_t inet_addr(const char *);
|
|||
#ifdef __osf__
|
||||
#include <unistd.h>
|
||||
#else
|
||||
#if !defined(USL) && !defined(__uxp__) && !defined(linux)
|
||||
#if !defined(USL) && !defined(__uxp__) && !defined(linux) && !defined(CSRG_BASED)
|
||||
#include <osfcn.h>
|
||||
#endif
|
||||
#endif /* __osf */
|
||||
|
|
|
@ -36,12 +36,12 @@
|
|||
|
||||
#define X_INCLUDE_NETDB_H
|
||||
#define XOS_USE_XT_LOCKING
|
||||
#if defined(linux)
|
||||
#if defined(linux) || defined(CSRG_BASED)
|
||||
#define index
|
||||
#define rindex
|
||||
#endif
|
||||
#include <X11/Xos_r.h>
|
||||
#if defined(linux)
|
||||
#if defined(linux) || defined(CSRG_BASED)
|
||||
#undef index
|
||||
#undef rindex
|
||||
#endif
|
||||
|
|
|
@ -225,7 +225,7 @@ _Tt_ostream::operator <<(
|
|||
return *this;
|
||||
}
|
||||
|
||||
#if defined(__osf__) || defined(linux)
|
||||
#if defined(__osf__) || defined(linux) || defined(CSRG_BASED)
|
||||
/* This operator is being added to take care of uid_t and gid_t
|
||||
* for osf */
|
||||
const _Tt_ostream &
|
||||
|
|
|
@ -86,7 +86,7 @@ class _Tt_ostream : public virtual _Tt_allocated {
|
|||
const _Tt_ostream &operator <<(
|
||||
int n
|
||||
) const;
|
||||
#if defined(__osf__) || defined(linux)
|
||||
#if defined(__osf__) || defined(linux) || defined(CSRG_BASED)
|
||||
const _Tt_ostream &operator <<(
|
||||
unsigned int n
|
||||
) const;
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
#ifdef __osf__
|
||||
#include <unistd.h>
|
||||
#else
|
||||
#if !defined (USL) && !defined(__uxp__) && !defined(linux)
|
||||
#if !defined (USL) && !defined(__uxp__) && !defined(linux) && !defined(CSRG_BASED)
|
||||
#include <osfcn.h>
|
||||
#endif
|
||||
#endif /* __osf__ */
|
||||
|
|
|
@ -49,12 +49,12 @@
|
|||
/* Included after "util/tt_string.h" to avoid index/strchr conflicts. */
|
||||
#define X_INCLUDE_DIRENT_H
|
||||
#define XOS_USE_NO_LOCKING
|
||||
#if defined(linux)
|
||||
#if defined(linux) || defined(CSRG_BASED)
|
||||
#define index
|
||||
#define rindex
|
||||
#endif
|
||||
#include <X11/Xos_r.h>
|
||||
#if defined(linux)
|
||||
#if defined(linux) || defined(CSRG_BASED)
|
||||
#undef index
|
||||
#undef rindex
|
||||
#endif
|
||||
|
|
|
@ -54,7 +54,7 @@
|
|||
#endif
|
||||
#include <stdlib.h>
|
||||
#include <ctype.h>
|
||||
#if defined(linux)
|
||||
#if defined(linux) || defined(CSRG_BASED)
|
||||
#include <wctype.h>
|
||||
#endif
|
||||
#include "util/tt_string.h"
|
||||
|
@ -1065,6 +1065,7 @@ _tt_xdr_decode(xdrproc_t xdr_fn, void *data, _Tt_string opaque_string)
|
|||
/*
|
||||
* XDR encode or decode a _Tt_string
|
||||
*/
|
||||
int
|
||||
tt_xdr_string(XDR *xdrs, _Tt_string *s)
|
||||
{
|
||||
return(s->xdr(xdrs));
|
||||
|
|
|
@ -45,12 +45,12 @@
|
|||
/* Included after "util/tt_string.h" to avoid index/strchr conflicts. */
|
||||
#define X_INCLUDE_STRING_H
|
||||
#define XOS_USE_NO_LOCKING
|
||||
#if defined(linux)
|
||||
#if defined(linux) || defined(CSRG_BASED)
|
||||
#define index
|
||||
#define rindex
|
||||
#endif
|
||||
#include <X11/Xos_r.h>
|
||||
#if defined(linux)
|
||||
#if defined(linux) || defined(CSRG_BASED)
|
||||
#undef index
|
||||
#undef rindex
|
||||
#endif
|
||||
|
|
|
@ -48,7 +48,11 @@
|
|||
*/
|
||||
#undef MAXINT
|
||||
#endif
|
||||
#if defined(CSRG_BASED)
|
||||
#define MAXINT INT_MAX
|
||||
#else
|
||||
#include <values.h>
|
||||
#endif
|
||||
|
||||
static int _tt_csh_match(const char *, const char *);
|
||||
static int _tt_csh_match_star(const char *, const char *);
|
||||
|
|
|
@ -41,7 +41,8 @@
|
|||
#include "util/tt_trace_parser.h"
|
||||
#include "util/tt_entry_pt_names.h"
|
||||
|
||||
#if defined (_AIX) || defined(hpux) || defined(__osf__) || defined(linux)
|
||||
#if defined (_AIX) || defined(hpux) || defined(__osf__) || defined(linux) || \
|
||||
defined(CSRG_BASED)
|
||||
#include <fcntl.h>
|
||||
#endif
|
||||
|
||||
|
|
|
@ -40,6 +40,10 @@
|
|||
#include <memory.h>
|
||||
#include "tt_options.h"
|
||||
|
||||
#if defined(CSRG_BASED)
|
||||
#define XDR __rpc_xdr
|
||||
#endif
|
||||
|
||||
typedef bool_t (*local_xdrproc_t)(XDR *, caddr_t *);
|
||||
|
||||
#ifndef OPT_XDR_LONG_TYPE
|
||||
|
@ -58,7 +62,11 @@ static bool_t
|
|||
* The third agrument is also wrong. Both SUN and DEC system header files
|
||||
* expect int instead of u_int.
|
||||
*/
|
||||
#if defined(CSRG_BASED)
|
||||
tt_x_putbytes(XDR *xp, caddr_t, unsigned int len)
|
||||
#else
|
||||
tt_x_putbytes(XDR *xp, caddr_t, int len)
|
||||
#endif
|
||||
{
|
||||
xp->x_handy += RNDUP (len);
|
||||
return TRUE;
|
||||
|
@ -66,10 +74,16 @@ tt_x_putbytes(XDR *xp, caddr_t, int len)
|
|||
|
||||
#if defined(ultrix) || defined(__osf__)
|
||||
static int*
|
||||
#elif defined(CSRG_BASED)
|
||||
static int32_t*
|
||||
#else
|
||||
static long *
|
||||
#endif
|
||||
#if defined(CSRG_BASED)
|
||||
tt_x_inline(XDR *xp, unsigned int len)
|
||||
#else
|
||||
tt_x_inline(XDR *xp, int len)
|
||||
#endif
|
||||
{
|
||||
/* Be paranoid -- some code really expects inline to
|
||||
* always succeed, so we keep a small buffer around
|
||||
|
@ -83,6 +97,8 @@ tt_x_inline(XDR *xp, int len)
|
|||
xp->x_handy += RNDUP (len);
|
||||
#if defined(ultrix) || defined(__osf__)
|
||||
return (int *) xp->x_private;
|
||||
#elif defined(CSRG_BASED)
|
||||
return (int32_t *) xp->x_private;
|
||||
#else
|
||||
return (long *) xp->x_private;
|
||||
#endif
|
||||
|
|
|
@ -474,7 +474,7 @@ extern int _isfcb_cntlpg_w();
|
|||
#define VL_RECNOTAIL ((long ) -2L)
|
||||
|
||||
|
||||
extern long lseek();
|
||||
/* extern long lseek(); */
|
||||
|
||||
extern char *_ismalloc(), *_isrealloc(), *_isallocstring();
|
||||
extern void _isfree(), _isfreestring();
|
||||
|
|
|
@ -39,7 +39,7 @@ static char sccsid[] = "@(#)iscntl.c 1.8 94/11/17";
|
|||
* Generic control function
|
||||
*/
|
||||
|
||||
#if defined(linux)
|
||||
#if defined(linux) || defined(CSRG_BASED)
|
||||
#include <stdarg.h>
|
||||
#else
|
||||
#include <varargs.h>
|
||||
|
@ -79,7 +79,7 @@ static char sccsid[] = "@(#)iscntl.c 1.8 94/11/17";
|
|||
|
||||
typedef int (* intfunc)();
|
||||
|
||||
#if defined(linux)
|
||||
#if defined(linux) || defined(CSRG_BASED)
|
||||
int
|
||||
iscntl(int isfd, int func, ...)
|
||||
#else
|
||||
|
@ -94,7 +94,7 @@ iscntl(isfd, func, va_alist)
|
|||
va_list pvar;
|
||||
int ret;
|
||||
|
||||
#if defined(linux)
|
||||
#if defined(linux) || defined(CSRG_BASED)
|
||||
va_start(pvar, func);
|
||||
#else
|
||||
va_start(pvar);
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
* Copyright (c) 1990 by Sun Microsystems, Inc.
|
||||
*/
|
||||
#include <stdlib.h>
|
||||
#if defined(linux)
|
||||
#if defined(linux) || defined(CSRG_BASED)
|
||||
/*# include <g++/minmax.h>*/
|
||||
#else
|
||||
# include <macros.h>
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
//%% (c) Copyright 1993, 1994 Novell, Inc.
|
||||
//%% $TOG: mp_ptype.C /main/4 1998/03/20 14:27:56 mgreess $
|
||||
#include <stdlib.h>
|
||||
#if defined(linux)
|
||||
#if defined(linux) || defined(CSRG_BASED)
|
||||
/*# include <g++/minmax.h>*/
|
||||
#else
|
||||
# include <macros.h>
|
||||
|
|
|
@ -49,7 +49,7 @@
|
|||
#include <sys/uio.h>
|
||||
#include <fcntl.h>
|
||||
#include <unistd.h>
|
||||
#if defined(linux)
|
||||
#if defined(linux) || defined(CSRG_BASED)
|
||||
/*# include <g++/minmax.h>*/
|
||||
#else
|
||||
# include <macros.h>
|
||||
|
|
|
@ -35,7 +35,7 @@
|
|||
* a procedure.
|
||||
*/
|
||||
#include <stdlib.h>
|
||||
#if defined(linux)
|
||||
#if defined(linux) || defined(CSRG_BASED)
|
||||
/*# include <g++/minmax.h>*/
|
||||
#else
|
||||
# include <macros.h>
|
||||
|
|
|
@ -39,7 +39,7 @@
|
|||
// databases.
|
||||
//
|
||||
#include <stdlib.h>
|
||||
#if defined(linux)
|
||||
#if defined(linux) || defined(CSRG_BASED)
|
||||
/*# include <g++/minmax.h>*/
|
||||
#else
|
||||
# include <macros.h>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue