mirror of
git://git.code.sf.net/p/cdesktopenv/code
synced 2025-02-13 19:52:20 +00:00
FreeBSD port: dtsearch, dtterm, dtwidget, dthelp
FreeBSD portability of dtsearch, dtterm, dtwidget, dthelp Work in progress for dtlogin and dtmail
This commit is contained in:
parent
ee03634a10
commit
31aaa48344
19 changed files with 43 additions and 27 deletions
|
@ -22,6 +22,9 @@ SUBDIRS = linux
|
|||
#ifdef OpenBSDArchitecture
|
||||
PLATFORM = openbsd
|
||||
#endif
|
||||
#ifdef FreeBSDArchitecture
|
||||
PLATFORM = freebsd
|
||||
#endif
|
||||
#ifdef RsArchitecture
|
||||
PLATFORM = aix
|
||||
SUBDIRS = ibm
|
||||
|
|
|
@ -67,8 +67,10 @@ XCOMM site: $TOG: site.def /main/23 1998/03/19 18:43:26 mgreess $
|
|||
#ifdef AfterVendorCF
|
||||
|
||||
#ifndef X11ProjectRoot
|
||||
# if defined(LinuxArchitecture) || defined(FreeBSDArchitecture)
|
||||
# if defined(LinuxArchitecture)
|
||||
# define X11ProjectRoot /usr
|
||||
#elif defined(FreeBSDArchitecture)
|
||||
# define X11ProjectRoot /usr/local
|
||||
# else
|
||||
# define X11ProjectRoot /X11
|
||||
# endif
|
||||
|
|
|
@ -30,6 +30,9 @@ UDB_RELEASE_OPT = -ReleaseStream linux
|
|||
#ifdef OpenBSDArchitecture
|
||||
UDB_RELEASE_OPT = -ReleaseStream openbsd
|
||||
#endif
|
||||
#ifdef FreeBSDArchitecture
|
||||
UDB_RELEASE_OPT = -ReleaseStream freebsd
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Insure that symbols used in the .udb files are undefined for
|
||||
|
|
|
@ -314,10 +314,8 @@ int DtSearchInit (
|
|||
aa_argv0 = argv0;
|
||||
if (err_file)
|
||||
aa_stderr = err_file;
|
||||
#if defined(linux) || defined(CSRG_BASED)
|
||||
else
|
||||
aa_stderr = stderr;
|
||||
#endif
|
||||
|
||||
sprintbuf = austext_malloc (SPRINTBUFSZ, PROGNAME "135", NULL);
|
||||
|
||||
|
|
|
@ -60,11 +60,7 @@
|
|||
#include <stdio.h>
|
||||
#include <nl_types.h>
|
||||
|
||||
#if defined(linux)
|
||||
FILE *aa_stderr = NULL;
|
||||
#else
|
||||
FILE *aa_stderr = stderr;
|
||||
#endif
|
||||
char *aa_argv0 = "<argv0>";
|
||||
nl_catd dtsearch_catd = (nl_catd) -1;
|
||||
nl_catd austools_catd = (nl_catd) -1;
|
||||
|
|
|
@ -86,7 +86,7 @@
|
|||
# define __SVR4_I386_ABI_L1__
|
||||
#endif
|
||||
#include <limits.h> /* pickup WORD_BIT, LONG_BIT */
|
||||
#if defined(linux)
|
||||
#if defined(linux) || defined(__FreeBSD__)
|
||||
# undef __SVR4_I386_ABI_L1__
|
||||
# ifndef WORD_BIT
|
||||
# define WORD_BIT 32
|
||||
|
|
|
@ -109,6 +109,10 @@ LinkFile(TermPrimGetPty.c,TermPrimGetPty-svr4.c)
|
|||
LinkFile(TermPrimGetPty.c,TermPrimGetPty-svr4.c)
|
||||
#endif
|
||||
|
||||
#ifdef FreeBSDArchitecture
|
||||
LinkFile(TermPrimGetPty.c,TermPrimGetPty-bsd.c)
|
||||
#endif
|
||||
|
||||
#ifdef OpenBSDArchitecture
|
||||
LinkFile(TermPrimGetPty.c,TermPrimGetPty-bsd.c)
|
||||
#endif
|
||||
|
|
|
@ -39,10 +39,10 @@ static char rcs_id[] = "$XConsortium: TermPrimDebug.c /main/4 1996/11/21 19:58:1
|
|||
#include <stdio.h>
|
||||
#include <unistd.h>
|
||||
#include <stdlib.h>
|
||||
#if !defined(linux)
|
||||
# include <varargs.h>
|
||||
#else
|
||||
#if defined(linux) || defined(CSRG_BASED)
|
||||
# include <stdarg.h>
|
||||
#else
|
||||
# include <varargs.h>
|
||||
#endif
|
||||
#include "TermHeader.h"
|
||||
#include "TermPrimDebug.h"
|
||||
|
|
|
@ -96,11 +96,11 @@
|
|||
# define USE_TCSENDBREAK /* use tiocbreak() */
|
||||
#endif /* LINUX_ARCHITECTURE */
|
||||
|
||||
#ifdef OPENBSD_ARCHITECTURE
|
||||
#ifdef CSRG_BASED
|
||||
# define HAS_SETEUID /* seteuid available */
|
||||
# define HAS_SETREUID /* setreuid available */
|
||||
# define USE_TCSENDBREAK /* use tiocbreak() */
|
||||
#endif /* OPENBSD_ARCHITECTURE */
|
||||
#endif /* CSRG_BASED */
|
||||
|
||||
#ifdef SUN_ARCHITECTURE
|
||||
# define XOR_CAPS_LOCK /* xor caps lock and shift */
|
||||
|
|
|
@ -60,6 +60,12 @@ static char rcs_id[] = "$TOG: TermPrimSetUtmp.c /main/10 1998/04/03 17:11:42 mgr
|
|||
#define UT_NO_pututline
|
||||
#endif /* sun */
|
||||
|
||||
#ifdef __FreeBSD__
|
||||
#define UT_UTMPX
|
||||
#define UT_HOST ut_host
|
||||
#define UT_NO_pututline
|
||||
#endif
|
||||
|
||||
#ifdef sun
|
||||
#define UT_UTMPX
|
||||
#define UT_HOST ut_host
|
||||
|
|
|
@ -15,7 +15,7 @@ XCOMM $XConsortium: Imakefile /main/8 1996/04/21 19:11:16 drk $
|
|||
DEFINES = DtWidgetDefines
|
||||
#if defined(LinuxArchitecture)
|
||||
INCLUDES = -I. -I/usr/include/freetype2
|
||||
#elif defined(OpenBSDArchitecture)
|
||||
#elif defined(OpenBSDArchitecture) || defined(FreeBSDArchitecture)
|
||||
INCLUDES = -I. -I$(XPROJECTROOT)/include/freetype2
|
||||
#else
|
||||
INCLUDES = -I.
|
||||
|
|
|
@ -439,7 +439,7 @@ M_PAREXTERN int m_argc ;
|
|||
M_PAREXTERN char **m_argv ;
|
||||
|
||||
/* PARSER output file */
|
||||
#if defined(linux)
|
||||
#if defined(linux) || defined(CSRG_BASED)
|
||||
M_PAREXTERN FILE *m_outfile;
|
||||
M_PAREXTERN FILE *m_errfile;
|
||||
#else
|
||||
|
|
|
@ -437,7 +437,7 @@ M_PAREXTERN int m_argc ;
|
|||
M_PAREXTERN char **m_argv ;
|
||||
|
||||
/* PARSER output file */
|
||||
#if defined(linux)
|
||||
#if defined(linux) || defined(CSRG_BASED)
|
||||
M_PAREXTERN FILE *m_outfile;
|
||||
M_PAREXTERN FILE *m_errfile;
|
||||
#else
|
||||
|
|
|
@ -437,7 +437,7 @@ M_PAREXTERN int m_argc ;
|
|||
M_PAREXTERN char **m_argv ;
|
||||
|
||||
/* PARSER output file */
|
||||
#if defined(linux)
|
||||
#if defined(linux) || defined(CSRG_BASED)
|
||||
M_PAREXTERN FILE *m_outfile;
|
||||
M_PAREXTERN FILE *m_errfile;
|
||||
#else
|
||||
|
|
|
@ -53,11 +53,15 @@
|
|||
|
||||
# include <sys/signal.h>
|
||||
# include <sys/stat.h>
|
||||
#if defined(__FreeBSD__)
|
||||
# include <utmpx.h>
|
||||
#else
|
||||
# include <utmp.h>
|
||||
#endif
|
||||
# include <time.h>
|
||||
# include <utime.h>
|
||||
# include <pwd.h>
|
||||
#if defined(linux)
|
||||
#if defined(linux) || defined(__FreeBSD__)
|
||||
# include <stdarg.h>
|
||||
#else
|
||||
# include <varargs.h>
|
||||
|
@ -936,9 +940,9 @@ StartDisplay(
|
|||
else {
|
||||
strncpy(&(d->utmpId[strlen(d->utmpId)]), t++, 1);
|
||||
}
|
||||
} while (*t != NULL);
|
||||
} while (*t != '\0');
|
||||
|
||||
if (*t == NULL) {
|
||||
if (*t == '\0') {
|
||||
Debug ("All DT utmp IDs already in use. Removing display %s\n",
|
||||
d->name);
|
||||
LogError ((unsigned char *)"All DT utmp IDs already in use. Removing display %s\n",
|
||||
|
|
|
@ -202,7 +202,7 @@
|
|||
***************************************************************************/
|
||||
|
||||
/*#if defined(SYSV) && !defined(hpux)*/
|
||||
#if defined(SYSV) || defined(SVR4) || defined(linux)
|
||||
#if defined(SYSV) || defined(SVR4) || defined(linux) || defined(__FreeBSD__)
|
||||
# include <sys/wait.h>
|
||||
# define waitCode(w) WEXITSTATUS(w)
|
||||
# define waitSig(w) WTERMSIG(w)
|
||||
|
@ -477,7 +477,7 @@ struct verify_info {
|
|||
*
|
||||
***************************************************************************/
|
||||
|
||||
#if !defined(linux)
|
||||
#if !defined(linux) && !defined(CSRG_BASED)
|
||||
extern char *sys_errlist[]; /* system error msgs */
|
||||
extern int sys_nerr; /* system error msgs */
|
||||
#endif
|
||||
|
|
|
@ -25,9 +25,9 @@
|
|||
#include <DtMail/DtMailValues.hh>
|
||||
|
||||
struct ImplConfigTable {
|
||||
char *impl_name;
|
||||
char *lib_name;
|
||||
char *meta_entry_point;
|
||||
const char *impl_name;
|
||||
const char *lib_name;
|
||||
const char *meta_entry_point;
|
||||
};
|
||||
|
||||
static const ImplConfigTable initial_impls[] = {
|
||||
|
|
|
@ -1618,7 +1618,7 @@ char *from_cs, char *to_cs)
|
|||
DtMailEnv error;
|
||||
iconv_t cd;
|
||||
size_t ileft = (size_t) bp_len, oleft = (size_t) bp_len, ret = 0;
|
||||
#if defined(_AIX) || defined(sun)
|
||||
#if defined(_AIX) || defined(sun) | defined(CSRG_BASED)
|
||||
const char *ip = (const char *) *bp;
|
||||
#else
|
||||
char *ip = *bp;
|
||||
|
|
|
@ -1030,7 +1030,7 @@ char *from_cs, char *to_cs)
|
|||
DtMailEnv error;
|
||||
iconv_t cd;
|
||||
size_t ileft = (size_t) bp_len, oleft = (size_t) bp_len, ret = 0;
|
||||
#if defined(_aix) || defined(sun)
|
||||
#if defined(_aix) || defined(sun) || defined(CSRG_BASED)
|
||||
const char *ip = (const char *) *bp;
|
||||
#else
|
||||
char *ip = *bp;
|
||||
|
|
Loading…
Reference in a new issue