#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__)
#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__)
*/
#undef MAXINT
#endif
+#if defined(CSRG_BASED)
+#define MAXINT INT_MAX
+#else
#include <values.h>
+#endif
#ifdef __cplusplus
#include <sys/stat.h>
#include <sys/param.h>
#include <errno.h>
+#include <stdint.h>
#include <unistd.h>
#include <nl_types.h>
}
} 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*/
#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__)
*/
#include <errno.h>
-#if defined(__osf__) || defined(linux)
+#if defined(__osf__) || defined(linux) || defined(CSRG_BASED)
#include <unistd.h>
#else
#ifndef USL
(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) {
*
*/
-#if defined(__osf__) || defined(linux)
+#if defined(__osf__) || defined(linux) || defined(CSRG_BASED)
#include <unistd.h>
#else
#if defined (USL) || defined(__uxp__)
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..
// 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;
}
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);
#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"
_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()
# 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.
{
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;
{
return _ttdt_pat( TTDT_SET_GEOMETRY, _ttdt_Geometry_out_cb,
category, commission,
- callback, clientdata, register_it );
+ (void *)callback, clientdata, register_it );
}
Tt_pattern
{
return _ttdt_pat( TTDT_GET_GEOMETRY, _ttdt_Geometry_out_cb,
category, commission,
- callback, clientdata, register_it );
+ (void *)callback, clientdata, register_it );
}
static int
{
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;
return _ttdt_pat( TTDT_SET_ICONIFIED, _ttdt_Iconified_out_cb,
category, commission,
- callback, clientdata, register_it );
+ (void *)callback, clientdata, register_it );
}
Tt_pattern
{
return _ttdt_pat( TTDT_GET_ICONIFIED, _ttdt_Iconified_out_cb,
category, commission,
- callback, clientdata, register_it );
+ (void *)callback, clientdata, register_it );
}
//
{
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;
{
return _ttdt_pat( TTDT_SET_XINFO, _ttdt_XInfo_out_cb,
category, commission,
- callback, clientdata, register_it );
+ (void *)callback, clientdata, register_it );
}
Tt_pattern
{
return _ttdt_pat( TTDT_GET_XINFO, _ttdt_XInfo_out_cb,
category, commission,
- callback, clientdata, register_it );
+ (void *)callback, clientdata, register_it );
}
//
}
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) {
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;
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 );
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;
)
{
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;
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;
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] );
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] );
}
}
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 ));
{
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) {
)
{
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;
(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 ] );
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 );
}
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 );
}
# 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" \
: (((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)
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;
#else
while (entry = getmntent(mount_table))
#endif
-#ifndef __osf__
+#if !defined(__osf__) && !defined(CSRG_BASED)
{
#endif
fse = createFileSystemEntry( entry );
#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 */
#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
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 &
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;
#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__ */
/* 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
#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"
/*
* XDR encode or decode a _Tt_string
*/
+int
tt_xdr_string(XDR *xdrs, _Tt_string *s)
{
return(s->xdr(xdrs));
/* 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
*/
#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 *);
#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
#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
* 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;
#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
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
#define VL_RECNOTAIL ((long ) -2L)
-extern long lseek();
+/* extern long lseek(); */
extern char *_ismalloc(), *_isrealloc(), *_isallocstring();
extern void _isfree(), _isfreestring();
* Generic control function
*/
-#if defined(linux)
+#if defined(linux) || defined(CSRG_BASED)
#include <stdarg.h>
#else
#include <varargs.h>
typedef int (* intfunc)();
-#if defined(linux)
+#if defined(linux) || defined(CSRG_BASED)
int
iscntl(int isfd, int func, ...)
#else
va_list pvar;
int ret;
-#if defined(linux)
+#if defined(linux) || defined(CSRG_BASED)
va_start(pvar, func);
#else
va_start(pvar);
* 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>
//%% (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>
#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>
* a procedure.
*/
#include <stdlib.h>
-#if defined(linux)
+#if defined(linux) || defined(CSRG_BASED)
/*# include <g++/minmax.h>*/
#else
# include <macros.h>
// databases.
//
#include <stdlib.h>
-#if defined(linux)
+#if defined(linux) || defined(CSRG_BASED)
/*# include <g++/minmax.h>*/
#else
# include <macros.h>