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

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -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[] = {

View File

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

View File

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