#ifdef OpenBSDArchitecture
PLATFORM = openbsd
#endif
+#ifdef FreeBSDArchitecture
+PLATFORM = freebsd
+#endif
#ifdef RsArchitecture
PLATFORM = aix
SUBDIRS = ibm
#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
#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
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);
#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;
# 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
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
#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"
# 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 */
#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
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.
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
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
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
# 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>
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",
***************************************************************************/
/*#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)
*
***************************************************************************/
-#if !defined(linux)
+#if !defined(linux) && !defined(CSRG_BASED)
extern char *sys_errlist[]; /* system error msgs */
extern int sys_nerr; /* system error msgs */
#endif
#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[] = {
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;
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;