Tooltalk fixes for OpenBSD. This consists mainly of #ifdefs, casts and some small...
authorPascal Stumpf <Pascal.Stumpf@cubes.de>
Fri, 10 Aug 2012 12:07:06 +0000 (14:07 +0200)
committerJon Trulson <jon@radscan.com>
Fri, 10 Aug 2012 12:24:29 +0000 (06:24 -0600)
39 files changed:
cde/lib/tt/bin/shell/mover.C
cde/lib/tt/bin/shell/remover.C
cde/lib/tt/bin/tt_type_comp/frozen.mp_types_gram.C
cde/lib/tt/bin/ttdbserverd/db_server_functions.C
cde/lib/tt/bin/tttar/tttar.C
cde/lib/tt/bin/tttar/tttar_api.C
cde/lib/tt/bin/tttar/tttar_spec.C
cde/lib/tt/lib/api/c/api_api.C
cde/lib/tt/lib/db/tt_db_property.C
cde/lib/tt/lib/mp/mp_c_session.C
cde/lib/tt/lib/mp/mp_desktop.C
cde/lib/tt/lib/mp/mp_message.C
cde/lib/tt/lib/tt_options.h
cde/lib/tt/lib/tttk/ttdesktop.C
cde/lib/tt/lib/tttk/ttdtfile.C
cde/lib/tt/lib/tttk/ttdtprocid.C
cde/lib/tt/lib/tttk/ttmedia.C
cde/lib/tt/lib/tttk/tttk.C
cde/lib/tt/lib/tttk/tttkmessage.C
cde/lib/tt/lib/tttk/tttkpattern.C
cde/lib/tt/lib/util/tt_file_system.C
cde/lib/tt/lib/util/tt_host.C
cde/lib/tt/lib/util/tt_host_equiv.C
cde/lib/tt/lib/util/tt_iostream.C
cde/lib/tt/lib/util/tt_iostream.h
cde/lib/tt/lib/util/tt_log.C
cde/lib/tt/lib/util/tt_path.C
cde/lib/tt/lib/util/tt_string.C
cde/lib/tt/lib/util/tt_string_map.C
cde/lib/tt/lib/util/tt_string_match.C
cde/lib/tt/lib/util/tt_tracefile_parse.C
cde/lib/tt/lib/util/tt_xdr_utils.C
cde/lib/tt/mini_isam/isam_impl.h
cde/lib/tt/mini_isam/iscntl.c
cde/lib/tt/slib/mp_otype.C
cde/lib/tt/slib/mp_ptype.C
cde/lib/tt/slib/mp_rpc_implement.C
cde/lib/tt/slib/mp_signature.C
cde/lib/tt/slib/mp_typedb.C

index 264f50a41767d972bea2f2374391a19d0871490f..6a412c0b7425e808dae92cd5d0b82e791e40355d 100644 (file)
@@ -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__)
index 3d3002d5cfe75dbcbea2b1c61a86fe52a4fe5e20..f96b32ce4fd65980db15caf9ec66c9dee6864a48 100644 (file)
@@ -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__)
index 7a532eef153b817ddd087de31e368b14ea7aa8d0..cbd4ec74aac6d73e584ddfa88202af29de32950d 100644 (file)
@@ -91,7 +91,11 @@ typedef union
  */
 #undef MAXINT
 #endif
+#if defined(CSRG_BASED)
+#define MAXINT INT_MAX
+#else
 #include <values.h>
+#endif
 
 #ifdef __cplusplus
 
index e81863f2caaffadcc16ce2a3676f4171d998fd07..2264eb6e9cb212f2f86d9cf98290251b6adcbad4 100644 (file)
@@ -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*/
index c26432ff427973ed7b2c563c5d710a045d0dfa48..cf0875c8b5dcfc56251c74f4bab47cfda6d99396 100644 (file)
@@ -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__)
index 7622dcbb8342a048ee82d05dba181ad5c57ca085..29c002af2185a1de520e4ac0b51cece13a2c2826 100644 (file)
@@ -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) {
index 4c4df4ab81dfa5060ad0db7bb8abc5a54c2e71e6..659bf6ffa6e57b373d7befe3fe9ddffff8abcd04 100644 (file)
@@ -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__)
index 902567768683fe7f0cab2481f2f8e3e33ed5ce7a..91ef6d4544b08159f4ae88bd4d7dbbeeb6e77cc7 100644 (file)
@@ -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..
index fb3cecac4ff7b0dcc394b54ae9119149082f610f..9a08a46879de219b340b865c46c9ff562ae5cbb4 100644 (file)
@@ -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;
 } 
index aefff74d213cbb3730e79750294c2e9a5e08d394..78a375325eddfc296402fff3a29bd1c1b006b4ce 100644 (file)
@@ -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);
        
index a550624a7c598ea79f0be9bf923e5faa2c468ff1..41198f8d0ebb881fa01fee467dcf46befa6dbd86 100644 (file)
@@ -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"
index 34e5b4a0df136ed6e086ae13446fc5ab3f590f72..1c00fca69b60b03f5443e4f34636bf1b6603ba27 100644 (file)
@@ -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()
index 52b9d1ece2072e9105ea85377ea9bd5899878e2c..e6f8c39346cc3974e8f86f832745428b27df55bc 100644 (file)
 # 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.
index 61130d269edcaa92d535c5f4a5494de55fd01e1d..3650d4ccb95e21c66811e43ec7500ccced2e8e45 100644 (file)
@@ -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 );
index ea1b5fb33a3668b57f9e16aaf68fa690572c25e4..4d5f29914cfc4809c2e848422ea5ba186c8859c4 100644 (file)
@@ -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;
index a9644bb0f5373bbb6a4f4c0842bd7403cc748c62..c47945e61450b4fe0c0e62529d01630da3572004 100644 (file)
@@ -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 ));
index 6792f6774ece5fe5fc2bf939ee3f9532114b03eb..094c7820ece3748fc285706b2259b45ad4734171 100644 (file)
@@ -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;
index 734adbdbbca607e1ebc3811289ebf3cd29d84a36..1f0c2b8fed22722ab9887a6c7f716c1b04b8aa34 100644 (file)
@@ -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 ] );
index c20606c58ac1de22c446d894e2e82288d3dc48dc..efe87e0d04428f2e227104d6d25faf2f14a2ac0a 100644 (file)
@@ -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 );
        }
index 8d88bf1d0306a5b334580c5f4e7529fedf815aea..d59accdd5e21e1d3889b16a06c60511101457690 100644 (file)
@@ -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 );
        }
index ef96dc3f929e3b488203c7b5f93ce31956bb1e3d..074d2a5bb87fe5d68d525344a4fecb1bbc9f47cb 100644 (file)
 #      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 );
index 4c3aed35958c9fe51b4e7953d89f9d7db425aa4c..5590c8fb7bac1f8835aaa8b435108d59d5180d94 100644 (file)
@@ -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 */
index fba3bdcb8e29c0a64bcfc81fd994493557f4fcbf..dec527bc063901733e6a3df3628603c4e323a3a7 100644 (file)
 
 #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
index 1a9e3db7b2e3da882df89cdd2baff44798f4270f..be69315ba07f1291f3db3f33054f2bf249fb1f52 100644 (file)
@@ -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 &
index 326f37d5b32c082854067fceeeed3a7a4793e7a8..a81444545049224084aa89810ce047912b6cbded 100644 (file)
@@ -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;
index 340efe161cbf955acea2ef6b4e827528d4480f41..48955ad2e856a5296822fe32d0469b81b0018aee 100644 (file)
@@ -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__ */
index 8dd9f2bbd60970b95bf867eceea0d4f2945e63af..e51fd2daba8cddebb6cea58f250e769dc4e1c288 100644 (file)
 /* 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
index 4b198bcccf67b49e122de3b265bae9cd421ad3bf..02855d358fc84243501c4bbc13c6e6b191724334 100644 (file)
@@ -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));
index 0c219c77845323716f88b4fa2899d3aba3e385dd..8d4c3c1b8e91e7bed556c36a498f7b3a76d60d29 100644 (file)
 /* 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
index ff53f686a08626b9433818ae6f180622884b746b..296708bb1bc2ea03a2f259305d3b338d85ad0817 100644 (file)
  */
 #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 *);
index bfbf7b9be4c09f6b93c4288c5934adde82124756..a5069aed5141d740b754590c3e8c69a3c3b053fd 100644 (file)
@@ -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
 
index 2a8432a00a15d4cd1d70cd4bb00f8ec153d8fb4c..ea814f67feffc264995b0e1950ca8729e36d7251 100644 (file)
 #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
index 92aea24fd3bfd9ac123ebef3778fb40f0ee5508b..2e851c03d99de43e11074f2ccba114d573eb53bf 100644 (file)
@@ -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();
index 80a9e23ea96cc1a5673856392a62a7d1e5daf0d0..1e28ddf9e4f7c08b447bbfa2c731de5acb20d96e 100644 (file)
@@ -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);
index cde56abf43f21439b130f8237186ef8c076fef68..48a78e0e6e567286620019e0c2cda9c3cb31e882 100644 (file)
@@ -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>
index 6878733661fa66577ab71da09ae8d8f026c4b072..76ce3a869ec45ca1e06cfe02c6937bc12c5924eb 100644 (file)
@@ -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>
index 22c22387ee1096cfe293b193f9adaf8f688ecf1d..68e9819e546b09dfa272be45e186f20809436dc0 100644 (file)
@@ -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>
index 259317b31b41b8e10164dd5b7e8cbce91442832b..62323573a9d7520bbe3cb52db51a18ec96c5f0a5 100644 (file)
@@ -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>
index 5ff381e170e1c9d3886e9ad944ff572437f9d0ca..ca1406510f8f266abd3dba14fe9220935cdbaf8a 100644 (file)
@@ -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>