mirror of
git://git.code.sf.net/p/cdesktopenv/code
synced 2025-02-13 19:52:20 +00:00
Compile ToolTalk on FreeBSD
Fix const correctness problems with OPT_CONST_CORRECT: tt_xdr_utils.C: In constructor '_Tt_xdr_size_stream::_Tt_xdr_size_stream()': tt_xdr_utils.C:150: error: invalid conversion from 'bool_t (*)(__rpc_xdr*, long int*)' to 'bool_t (*)(__rpc_xdr*, const long int*)' tt_xdr_utils.C:151: error: invalid conversion from 'bool_t (*)(__rpc_xdr*, char*, unsigned int)' to 'bool_t (*)(__rpc_xdr*, const char*, u_int)' tt_xdr_utils.C:159: error: invalid conversion from 'bool_t (*)(__rpc_xdr*, char*, unsigned int)' to 'bool_t (*)(__rpc_xdr*, const char*, u_int)' tt_entry_pt.C: In function '_Tt_string _tt_entrypt_to_string(_Tt_entry_pt)': tt_entry_pt.C:455: error: conversion from 'long int' to '_Tt_string' is ambiguous ../../lib/util/tt_string.h:104: note: candidates are: _Tt_string::_Tt_string(int) ../../lib/util/tt_string.h:102: note: _Tt_string::_Tt_string(const char*)
This commit is contained in:
parent
8e80886661
commit
bf8c5e674f
9 changed files with 51 additions and 6 deletions
|
@ -37,7 +37,7 @@
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include "util/copyright.h"
|
#include "util/copyright.h"
|
||||||
#if defined(linux) || defined(sgi)
|
#if defined(linux) || defined(sgi) || defined(__FreeBSD__)
|
||||||
#include <getopt.h>
|
#include <getopt.h>
|
||||||
#endif
|
#endif
|
||||||
#include "dbck.h"
|
#include "dbck.h"
|
||||||
|
|
|
@ -42,7 +42,7 @@
|
||||||
#if defined(linux)
|
#if defined(linux)
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#endif
|
#endif
|
||||||
#if defined(sgi)
|
#if defined(sgi) || defined(__FreeBSD__)
|
||||||
#include <getopt.h>
|
#include <getopt.h>
|
||||||
#endif
|
#endif
|
||||||
#if defined(USL) || defined(__uxp__)
|
#if defined(USL) || defined(__uxp__)
|
||||||
|
|
|
@ -46,6 +46,7 @@ in this Software without prior written authorization from The Open Group.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
#include <stdlib.h>
|
||||||
#include <X11/Xos.h>
|
#include <X11/Xos.h>
|
||||||
#include <X11/Xfuncs.h>
|
#include <X11/Xfuncs.h>
|
||||||
|
|
||||||
|
@ -57,7 +58,7 @@ typedef int Bool;
|
||||||
|
|
||||||
extern char *ProgramName;
|
extern char *ProgramName;
|
||||||
|
|
||||||
#if !defined(linux)
|
#if !defined(linux) && !defined(CSRG_BASED)
|
||||||
extern char *malloc(), *realloc();
|
extern char *malloc(), *realloc();
|
||||||
#endif
|
#endif
|
||||||
int process_command(), auth_initialize(), auth_finalize();
|
int process_command(), auth_initialize(), auth_finalize();
|
||||||
|
|
|
@ -45,7 +45,7 @@
|
||||||
|
|
||||||
extern uid_t _tt_uid;
|
extern uid_t _tt_uid;
|
||||||
extern gid_t _tt_gid;
|
extern gid_t _tt_gid;
|
||||||
extern gid_t _tt_gidlist [NGROUPS_MAX];
|
extern gid_t _tt_gidlist [NGROUPS];
|
||||||
extern int _tt_gidlen;
|
extern int _tt_gidlen;
|
||||||
extern int _tt_auth_level;
|
extern int _tt_auth_level;
|
||||||
|
|
||||||
|
|
|
@ -63,7 +63,7 @@
|
||||||
#include <termios.h>
|
#include <termios.h>
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
|
|
||||||
#if defined(sgi)
|
#if defined(sgi) || defined(__FreeBSD__)
|
||||||
#include <getopt.h>
|
#include <getopt.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -53,7 +53,7 @@
|
||||||
|
|
||||||
#include <sys/resource.h>
|
#include <sys/resource.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#if defined(sgi)
|
#if defined(sgi) || defined(__FreeBSD__)
|
||||||
#include <getopt.h>
|
#include <getopt.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -590,6 +590,40 @@
|
||||||
# define OPT_BUG_RPCINTR
|
# define OPT_BUG_RPCINTR
|
||||||
# undef OPT_XTHREADS
|
# undef OPT_XTHREADS
|
||||||
|
|
||||||
|
#elif defined(__FreeBSD__)
|
||||||
|
# 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
|
||||||
|
# if defined(OSMAJORVERSION) && (OSMAJORVERSION >= 5)
|
||||||
|
# define OPT_CPP_PATH "/usr/bin/cpp"
|
||||||
|
# else
|
||||||
|
# define OPT_CPP_PATH "/usr/libexec/cpp"
|
||||||
|
# endif
|
||||||
|
# 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
|
||||||
|
# define OPT_CONST_CORRECT
|
||||||
|
|
||||||
#else
|
#else
|
||||||
/* Unknown configuration, complain */
|
/* Unknown configuration, complain */
|
||||||
}}}} You must edit lib/tt_options.h and add a section defining the options for your configuration.
|
}}}} You must edit lib/tt_options.h and add a section defining the options for your configuration.
|
||||||
|
|
|
@ -451,6 +451,8 @@ _Tt_string _tt_entrypt_to_string(_Tt_entry_pt fun)
|
||||||
return "tt_feature_required";
|
return "tt_feature_required";
|
||||||
#if defined(__osf__) || defined(linux)
|
#if defined(__osf__) || defined(linux)
|
||||||
case TT_API_CALL_LAST: return (char *) NULL;
|
case TT_API_CALL_LAST: return (char *) NULL;
|
||||||
|
#elif defined(OPT_CONST_CORRECT)
|
||||||
|
case TT_API_CALL_LAST: return (const char *) NULL;
|
||||||
#else
|
#else
|
||||||
case TT_API_CALL_LAST: return NULL;
|
case TT_API_CALL_LAST: return NULL;
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -47,8 +47,12 @@
|
||||||
typedef bool_t (*local_xdrproc_t)(XDR *, caddr_t *);
|
typedef bool_t (*local_xdrproc_t)(XDR *, caddr_t *);
|
||||||
|
|
||||||
#ifndef OPT_XDR_LONG_TYPE
|
#ifndef OPT_XDR_LONG_TYPE
|
||||||
|
#if defined(OPT_CONST_CORRECT)
|
||||||
|
# define OPT_XDR_LONG_TYPE const long
|
||||||
|
#else
|
||||||
# define OPT_XDR_LONG_TYPE long
|
# define OPT_XDR_LONG_TYPE long
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
static bool_t
|
static bool_t
|
||||||
tt_x_putlong(XDR *xp, OPT_XDR_LONG_TYPE *)
|
tt_x_putlong(XDR *xp, OPT_XDR_LONG_TYPE *)
|
||||||
{
|
{
|
||||||
|
@ -63,7 +67,11 @@ static bool_t
|
||||||
* expect int instead of u_int.
|
* expect int instead of u_int.
|
||||||
*/
|
*/
|
||||||
#if defined(CSRG_BASED)
|
#if defined(CSRG_BASED)
|
||||||
|
#if defined(OPT_CONST_CORRECT)
|
||||||
|
tt_x_putbytes(XDR *xp, const char *, unsigned int len)
|
||||||
|
#else
|
||||||
tt_x_putbytes(XDR *xp, caddr_t, unsigned int len)
|
tt_x_putbytes(XDR *xp, caddr_t, unsigned int len)
|
||||||
|
#endif
|
||||||
#else
|
#else
|
||||||
tt_x_putbytes(XDR *xp, caddr_t, int len)
|
tt_x_putbytes(XDR *xp, caddr_t, int len)
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in a new issue