mirror of
git://git.code.sf.net/p/cdesktopenv/code
synced 2025-03-09 15:50:02 +00:00
Fixes for dtlogin and dtcm on FreeBSD.
This commit is contained in:
parent
591e58fe1a
commit
33da5fa944
6 changed files with 27 additions and 3 deletions
|
@ -388,6 +388,8 @@ cm_printf(double value, int decimal_pt)
|
|||
}
|
||||
#ifdef SunOS
|
||||
fconvert(value, decimal_pt, &deci_pt, &sign, buf);
|
||||
#elif defined(__FreeBSD__)
|
||||
snprintf(buf, decimal_pt, "%f", value);
|
||||
#else
|
||||
/* this version, available on the HP and AIX machine is not reentrant. */
|
||||
|
||||
|
|
|
@ -132,7 +132,7 @@ ds_position_popup(Widget base, Widget popup, ds_location_op location_op) {
|
|||
XmNy, &base_y,
|
||||
XmNwidth, &base_width,
|
||||
XmNheight, &base_height,
|
||||
0) ;
|
||||
NULL) ;
|
||||
bx = (int) base_x ;
|
||||
by = (int) base_y ;
|
||||
bw = (int) base_width ;
|
||||
|
@ -143,7 +143,7 @@ ds_position_popup(Widget base, Widget popup, ds_location_op location_op) {
|
|||
XmNy, &popup_y,
|
||||
XmNwidth, &popup_width,
|
||||
XmNheight, &popup_height,
|
||||
0) ;
|
||||
NULL) ;
|
||||
|
||||
px = (int) popup_x ;
|
||||
py = (int) popup_y ;
|
||||
|
@ -232,7 +232,7 @@ ds_force_popup_on_screen(Widget popup, int *popup_x_p, int *popup_y_p) {
|
|||
XtVaGetValues(popup,
|
||||
XmNwidth, &popup_width,
|
||||
XmNheight, &popup_height,
|
||||
0) ;
|
||||
NULL) ;
|
||||
|
||||
/* Make sure frame does not go off side of screen */
|
||||
|
||||
|
|
|
@ -57,7 +57,12 @@
|
|||
#endif
|
||||
|
||||
#include <fcntl.h>
|
||||
#if defined(__FreeBSD__)
|
||||
#include <utmpx.h>
|
||||
#else
|
||||
#include <utmp.h>
|
||||
#endif
|
||||
|
||||
#include <time.h>
|
||||
#include "dm.h"
|
||||
|
||||
|
|
|
@ -1697,8 +1697,13 @@ GettyMessage( struct display *d, int msgnum )
|
|||
int
|
||||
GettyRunning( struct display *d )
|
||||
{
|
||||
#if defined(__FreeBSD__)
|
||||
struct utmpx utmp; /* local struct for new entry */
|
||||
struct utmpx *u; /* pointer to entry in utmp file */
|
||||
#else
|
||||
struct utmp utmp; /* local struct for new entry */
|
||||
struct utmp *u; /* pointer to entry in utmp file */
|
||||
#endif
|
||||
|
||||
int rvalue; /* return value (TRUE or FALSE) */
|
||||
char buf[32];
|
||||
|
@ -1717,7 +1722,11 @@ GettyRunning( struct display *d )
|
|||
return FALSE;
|
||||
|
||||
|
||||
#if defined(__FreeBSD__)
|
||||
bzero(&utmp, sizeof(struct utmpx));
|
||||
#else
|
||||
bzero(&utmp, sizeof(struct utmp));
|
||||
#endif
|
||||
|
||||
#ifdef _AIX
|
||||
if (!strcmp(d->gettyLine,"console")) {
|
||||
|
|
|
@ -39,7 +39,11 @@
|
|||
# include <signal.h>
|
||||
# include <X11/Xatom.h>
|
||||
# include <setjmp.h>
|
||||
#if defined(__FreeBSD__)
|
||||
# include <utmpx.h>
|
||||
#else
|
||||
# include <utmp.h>
|
||||
#endif
|
||||
# include "vgproto.h"
|
||||
|
||||
/*
|
||||
|
|
|
@ -65,7 +65,11 @@
|
|||
# include <signal.h>
|
||||
# include <X11/Xatom.h>
|
||||
# include <setjmp.h>
|
||||
#if defined(__FreeBSD__)
|
||||
# include <utmpx.h>
|
||||
#else
|
||||
# include <utmp.h>
|
||||
#endif
|
||||
#include <unistd.h>
|
||||
#include <pwd.h>
|
||||
#include <dirent.h>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue