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:
Marcin Cieslak
2012-08-13 17:57:16 +02:00
committed by Jon Trulson
parent ee03634a10
commit 31aaa48344
19 changed files with 43 additions and 27 deletions

View File

@@ -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);

View File

@@ -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;

View File

@@ -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

View File

@@ -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

View File

@@ -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"

View File

@@ -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 */

View File

@@ -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

View File

@@ -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.