1
0
Fork 0
mirror of git://git.code.sf.net/p/cdesktopenv/code synced 2025-03-09 15:50:02 +00:00

dtlogin: fix implicit-function-declaration warnings

This commit is contained in:
Jon Trulson 2021-11-15 11:45:40 -07:00
parent abb408b24f
commit 47348e59de
15 changed files with 124 additions and 71 deletions

View file

@ -64,6 +64,9 @@
#include "rgy_base.h" #include "rgy_base.h"
#endif #endif
#if defined(HAS_PAM_LIBRARY)
# include <pam_svc.h>
#endif
/*************************************************************************** /***************************************************************************
* *
@ -126,9 +129,9 @@ static struct lastlogin last_login;
* *
* Account * Account
* *
* update utmp/wtmp files. * update utmp/wtmp files.
***************************************************************************/ ***************************************************************************/
void void
Account( struct display *d, char *user, char *line, pid_t pid, Account( struct display *d, char *user, char *line, pid_t pid,
#if NeedWidePrototypes #if NeedWidePrototypes
int type, int type,
@ -149,7 +152,7 @@ Account( struct display *d, char *user, char *line, pid_t pid,
char buf[32]; char buf[32];
char* user_str = user ? user : "NULL"; char* user_str = user ? user : "NULL";
char* line_str = line ? line : "NULL"; char* line_str = line ? line : "NULL";
#ifdef __PASSWD_ETC #ifdef __PASSWD_ETC
struct rtmp rtmp; struct rtmp rtmp;
struct rtmp *r; struct rtmp *r;
@ -158,9 +161,9 @@ Account( struct display *d, char *user, char *line, pid_t pid,
#endif #endif
if (d->utmpId == NULL) return; if (d->utmpId == NULL) return;
switch (type) { switch (type) {
case INIT_PROCESS: strcpy(buf, "INIT_PROCESS"); break; case INIT_PROCESS: strcpy(buf, "INIT_PROCESS"); break;
case LOGIN_PROCESS: strcpy(buf, "LOGIN_PROCESS"); break; case LOGIN_PROCESS: strcpy(buf, "LOGIN_PROCESS"); break;
case USER_PROCESS: strcpy(buf, "USER_PROCESS"); break; case USER_PROCESS: strcpy(buf, "USER_PROCESS"); break;
@ -172,14 +175,14 @@ Account( struct display *d, char *user, char *line, pid_t pid,
d->utmpId, user_str, line_str, pid, buf); d->utmpId, user_str, line_str, pid, buf);
#ifdef PAM #ifdef PAM
PamAccounting("dtlogin", d->name, d->utmpId, user, PamAccounting("dtlogin", d->name, d->utmpId, user,
line, pid, type, exitcode); line, pid, type, exitcode);
#elif defined(HAS_PAM_LIBRARY) #elif defined(HAS_PAM_LIBRARY)
_DtAccounting("dtlogin", d->name, d->utmpId, user, _DtAccounting("dtlogin", d->name, d->utmpId, user,
line, pid, type, exitcode); line, pid, type, exitcode);
#else #else
# ifdef SUNAUTH # ifdef SUNAUTH
solaris_accounting("dtlogin", d->name, d->utmpId, user, solaris_accounting("dtlogin", d->name, d->utmpId, user,
line, pid, type, exitcode); line, pid, type, exitcode);
# endif # endif
#endif #endif
@ -195,7 +198,7 @@ Account( struct display *d, char *user, char *line, pid_t pid,
strncpy(utmp.ut_id, d->utmpId, sizeof(u->ut_id) - 1); strncpy(utmp.ut_id, d->utmpId, sizeof(u->ut_id) - 1);
utmp.ut_type = LOGIN_PROCESS; utmp.ut_type = LOGIN_PROCESS;
#ifdef HAS_PAM_LIBRARY #ifdef HAS_PAM_LIBRARY
setutxent(); setutxent();
if ( (u = getutxid(&utmp)) == NULL ) u = &utmp; if ( (u = getutxid(&utmp)) == NULL ) u = &utmp;
@ -229,7 +232,7 @@ Account( struct display *d, char *user, char *line, pid_t pid,
* determine if restricted user licenses have been exceeded. * determine if restricted user licenses have been exceeded.
* Currently, an unlimited number of foreign displays can log in. * Currently, an unlimited number of foreign displays can log in.
*/ */
if (user) snprintf(u->ut_user, sizeof(u->ut_user), "%s", user); if (user) snprintf(u->ut_user, sizeof(u->ut_user), "%s", user);
if (line) { if (line) {
#ifdef _AIX #ifdef _AIX
@ -259,7 +262,7 @@ Account( struct display *d, char *user, char *line, pid_t pid,
} }
else else
snprintf(u->ut_line, sizeof(u->ut_line), "%s", line); snprintf(u->ut_line, sizeof(u->ut_line), "%s", line);
#else #else
snprintf(u->ut_line, sizeof(u->ut_line), "%s", line); snprintf(u->ut_line, sizeof(u->ut_line), "%s", line);
#endif #endif
@ -285,21 +288,26 @@ Account( struct display *d, char *user, char *line, pid_t pid,
u->ut_addr = 0; u->ut_addr = 0;
#endif #endif
} }
#ifndef HAS_PAM_LIBRARY #ifndef HAS_PAM_LIBRARY
if (type == USER_PROCESS) if (type == USER_PROCESS)
u->ut_exit.e_exit = (d->displayType.location == Local ? 1 : 0 ); u->ut_exit.e_exit = (d->displayType.location == Local ? 1 : 0 );
#endif #endif
} }
#ifdef HAS_PAM_LIBRARY #ifdef HAS_PAM_LIBRARY
(void) time(&u->ut_tv); {
struct timeval tmp_tv;
(void) gettimeofday(&tmp_tv, NULL);
u->ut_tv.tv_sec = (int32_t)tmp_tv.tv_sec;
u->ut_tv.tv_usec = (int32_t)tmp_tv.tv_usec;
}
#else #else
(void) time(&u->ut_time); (void) time(&u->ut_time);
#endif #endif
/* /*
* write to utmp... * write to utmp...
* *
* (Do not close utmp yet. If "u" points to the static structure, it is * (Do not close utmp yet. If "u" points to the static structure, it is
* cleared upon close. This does not bode well for the following write * cleared upon close. This does not bode well for the following write
@ -329,7 +337,7 @@ Account( struct display *d, char *user, char *line, pid_t pid,
/* /*
* close utmp... * close utmp...
*/ */
endutent(); endutent();
#else #else
endutxent(); endutxent();
@ -380,7 +388,7 @@ Account( struct display *d, char *user, char *line, pid_t pid,
} }
Debug("logging lastlogin entry (user=%s)\n",user); Debug("logging lastlogin entry (user=%s)\n",user);
dt_lastlogin(user,&last_login); dt_lastlogin(user,&last_login);
free(last_login.stty); free(last_login.stty);
free(last_login.shost); free(last_login.shost);
} }
@ -400,10 +408,10 @@ Account( struct display *d, char *user, char *line, pid_t pid,
* see if a particular utmp ID is available * see if a particular utmp ID is available
* *
* return codes: 0 = ID is in use * return codes: 0 = ID is in use
* 1 = ID is open * 1 = ID is open
***************************************************************************/ ***************************************************************************/
int int
UtmpIdOpen( char *utmpId ) UtmpIdOpen( char *utmpId )
{ {
int status = 1; /* return code */ int status = 1; /* return code */
@ -426,7 +434,7 @@ UtmpIdOpen( char *utmpId )
break; break;
} }
} }
#ifdef HAS_PAM_LIBRARY #ifdef HAS_PAM_LIBRARY
endutxent(); endutxent();
#else #else
@ -446,8 +454,8 @@ struct lastlogin * llogin;
char *tmp_char; char *tmp_char;
char *tmp_int; char *tmp_int;
/* /*
* We are loading all the lastlogin info into a struct and then dealing * We are loading all the lastlogin info into a struct and then dealing
* with that so if the technique of storing the values is redone it * with that so if the technique of storing the values is redone it
* will be easy * will be easy
*/ */
/* set id back to root */ /* set id back to root */
@ -503,4 +511,3 @@ struct lastlogin * llogin;
enduserdb(); enduserdb();
} }
#endif #endif

View file

@ -70,6 +70,11 @@
static char *Print8Address (ARRAY8Ptr Address); static char *Print8Address (ARRAY8Ptr Address);
int LoadXloginResources(struct display *d); // session.c
void GetSysParms(char **tzpp, char **fhpp, char **ftpp); // fontpath.c
int GetChooserAddr(char *addr, int *lenp); // socket.c
int NetaddrFamily(XdmcpNetaddr netaddrp); // netaddr.c
static int static int
FormatBytes ( FormatBytes (

View file

@ -209,6 +209,12 @@ static int pingTry;
static XdmcpBuffer directBuffer, broadcastBuffer; static XdmcpBuffer directBuffer, broadcastBuffer;
static XdmcpBuffer buffer; static XdmcpBuffer buffer;
// dtchooser.c
void MakeBackground(void);
void MakeButtons(void);
void MakeChooser(void);
/* ARGSUSED */ /* ARGSUSED */
static void static void

View file

@ -142,6 +142,9 @@ int TitleLen;
static int parent_pid = -1; /* PID of parent dtlogin process */ static int parent_pid = -1; /* PID of parent dtlogin process */
void init_session_id(void); // xdmcp.c
void RunChooser(struct display *d); // RunChooser.c
/***************************************************************************/ /***************************************************************************/

View file

@ -38,6 +38,7 @@
# include "dm.h" # include "dm.h"
# include <signal.h> # include <signal.h>
# include <X11/Xatom.h> # include <X11/Xatom.h>
# include <X11/Xmu/Error.h>
# include <setjmp.h> # include <setjmp.h>
#if defined(__FreeBSD__) && OSMAJORVERSION > 8 #if defined(__FreeBSD__) && OSMAJORVERSION > 8
# include <utmpx.h> # include <utmpx.h>
@ -57,6 +58,8 @@ static int PathInPList(char *path, char **fplist, int listlen);
static int PathInZList(char *path, char *fplist, int listlen); static int PathInZList(char *path, char *fplist, int listlen);
static int SeparateParts( char **path ); static int SeparateParts( char **path );
void GenerateAuthData(char *auth, int len); // genauth.c
static void static void
DebugFontPath(char *note, char **path, int nelems) DebugFontPath(char *note, char **path, int nelems)

View file

@ -94,7 +94,6 @@ from the X Consortium.
# include <X11/Xauth.h> # include <X11/Xauth.h>
# include <X11/Xos.h> # include <X11/Xos.h>
# include "dm.h" # include "dm.h"
#include <errno.h> #include <errno.h>
#ifdef X_NOT_STDC_ENV #ifdef X_NOT_STDC_ENV
@ -131,11 +130,16 @@ static int sumFile (char *name, long sum[2]);
#ifdef HASXDMAUTH #ifdef HASXDMAUTH
// Most of this comes from XDMCP's Wrap.h header
typedef unsigned char auth_cblock[8]; /* block size */ typedef unsigned char auth_cblock[8]; /* block size */
typedef struct auth_ks_struct { auth_cblock _; } auth_wrapper_schedule[16]; typedef struct auth_ks_struct { auth_cblock _; } auth_wrapper_schedule[16];
extern void _XdmcpWrapperToOddParity(); void _XdmcpWrapperToOddParity();
void _XdmcpAuthSetup (auth_cblock key, auth_wrapper_schedule schedule);
void _XdmcpAuthDoIt (auth_cblock input, auth_cblock output,
auth_wrapper_schedule schedule, int edflag);
static void static void
longtochars (long l, unsigned char *c) longtochars (long l, unsigned char *c)

View file

@ -92,6 +92,8 @@ from the X Consortium.
static char auth_name[256]; static char auth_name[256];
static int auth_name_len; static int auth_name_len;
void GenerateAuthData (char *auth, int len); // genauth.c
#if NeedWidePrototypes #if NeedWidePrototypes
int MitInitAuth (unsigned int name_len, char *name) int MitInitAuth (unsigned int name_len, char *name)
#else #else

View file

@ -57,9 +57,11 @@
# include <string.h> # include <string.h>
void CleanUpName( char *src, char *dst, int len) ; void CleanUpName( char *src, char *dst, int len) ;
static char * getFullFileName(char *name, int special, char * lang); static char * getFullFileName(char *name, int special, char * lang);
extern char * qualifyWithFirst(char *, char *); extern char * qualifyWithFirst(char *, char *);
void GetSysParms(char **tzpp, char **fhpp, char **ftpp); // fontpath.c
/* XtOffset() hack for ibmrt BandAidCompiler */ /* XtOffset() hack for ibmrt BandAidCompiler */

View file

@ -65,6 +65,7 @@
# include "vgmsg.h" # include "vgmsg.h"
# include <signal.h> # include <signal.h>
# include <X11/Xatom.h> # include <X11/Xatom.h>
# include <X11/Xmu/Error.h>
# include <setjmp.h> # include <setjmp.h>
#if defined(__FreeBSD__) && OSMAJORVERSION > 8 || defined(HAS_PAM_LIBRARY) #if defined(__FreeBSD__) && OSMAJORVERSION > 8 || defined(HAS_PAM_LIBRARY)
# include <utmpx.h> # include <utmpx.h>
@ -76,6 +77,7 @@
#include <dirent.h> #include <dirent.h>
#include <limits.h> #include <limits.h>
#include <ctype.h> #include <ctype.h>
#include <grp.h>
#ifdef SIA #ifdef SIA
#include <sia.h> #include <sia.h>
@ -110,6 +112,8 @@
#include <PamSvc.h> #include <PamSvc.h>
#endif #endif
int ApplyFontPathMods(struct display *d, Display *dpy); // fontpath.c
#ifdef SIA #ifdef SIA
static SIAENTITY *siaHandle = NULL; static SIAENTITY *siaHandle = NULL;
@ -221,6 +225,7 @@ static int session_execve(char *path, char *argv[], char *envp[]);
static void LoadAltDtsResources( struct display *d); static void LoadAltDtsResources( struct display *d);
char * _ExpandLang(char *string, char *lang); char * _ExpandLang(char *string, char *lang);
void freeEnv (char **env); // util.c
/*************************************************************************** /***************************************************************************
@ -265,7 +270,7 @@ catchAlrm( int arg )
#if defined(__STDC__) #if defined(__STDC__)
static int static int
FileNameCompare (const char *a, const char *b) FileNameCompare (const void *a, const void *b)
#else #else
static int static int
FileNameCompare (char *a, char *b) FileNameCompare (char *a, char *b)

View file

@ -105,6 +105,9 @@ extern int chooserFd;
extern FD_TYPE WellKnownSocketsMask; extern FD_TYPE WellKnownSocketsMask;
extern int WellKnownSocketsMax; extern int WellKnownSocketsMax;
void registerHostname (char *name, int namelen); // xdmcp.c
int int
CreateWellKnownSockets (void) CreateWellKnownSockets (void)
{ {

View file

@ -86,6 +86,7 @@
#if defined(PAM) || defined(HAS_PAM_LIBRARY) #if defined(PAM) || defined(HAS_PAM_LIBRARY)
#include <security/pam_appl.h> #include <security/pam_appl.h>
#include "pam_svc.h"
#endif #endif
#ifdef _AIX #ifdef _AIX

View file

@ -59,14 +59,13 @@
#include <string.h> #include <string.h>
#include <dirent.h> #include <dirent.h>
#include <Dt/MsgCatP.h> #include <Dt/MsgCatP.h>
#include <X11/Xutil.h>
#include <X11/Intrinsic.h>
#include <X11/StringDefs.h>
#include <X11/Xmu/SysUtil.h>
#include <Dt/HourGlass.h>
#include <signal.h> #include <signal.h>
# ifndef NULL
# define NULL 0
# endif
# include "dm.h" # include "dm.h"
# include "vgmsg.h" # include "vgmsg.h"
nl_catd nl_fd = (nl_catd)-1; /* message catalog file descriptor */ nl_catd nl_fd = (nl_catd)-1; /* message catalog file descriptor */
@ -86,13 +85,13 @@ char languageList[LANGLISTSIZE]; /* global list of languages */
* *
***************************************************************************/ ***************************************************************************/
static char * makeEnv( static char * makeEnv(
char *name, char *name,
char *value) ; char *value) ;
static SIGVAL MakeLangAbort( static SIGVAL MakeLangAbort(
int arg ); int arg );
static int MatchesFileSuffix(const char *filename, const char *suffix); static int MatchesFileSuffix(const char *filename, const char *suffix);
static void ScanNLSDir( static void ScanNLSDir(
@ -134,7 +133,7 @@ ReadCatalog( int set_num, int msg_num, char *def_str )
{ {
curNlsPath = NULL; curNlsPath = NULL;
} }
/* /*
* 7 is "NLSPATH" * 7 is "NLSPATH"
* 1 is "=" * 1 is "="
@ -153,7 +152,7 @@ ReadCatalog( int set_num, int msg_num, char *def_str )
} }
newNlsPath = malloc(newNlsPathLen); /* placed in environ, do not free */ newNlsPath = malloc(newNlsPathLen); /* placed in environ, do not free */
if (curNlsPath != NULL) if (curNlsPath != NULL)
{ {
sprintf(newNlsPath, "NLSPATH=%s:%s", curNlsPath, NLS_PATH_STRING); sprintf(newNlsPath, "NLSPATH=%s:%s", curNlsPath, NLS_PATH_STRING);
@ -162,12 +161,12 @@ ReadCatalog( int set_num, int msg_num, char *def_str )
{ {
sprintf(newNlsPath, "NLSPATH=%s", NLS_PATH_STRING); sprintf(newNlsPath, "NLSPATH=%s", NLS_PATH_STRING);
} }
/* /*
* Store new NLSPATH in environment. Note this memory cannot be freed * Store new NLSPATH in environment. Note this memory cannot be freed
*/ */
putenv(newNlsPath); putenv(newNlsPath);
/* /*
* Open message catalog. Note, if invalid descriptor returned (ie * Open message catalog. Note, if invalid descriptor returned (ie
* msg catalog could not be opened), subsequent call to catgets() using * msg catalog could not be opened), subsequent call to catgets() using
@ -186,7 +185,7 @@ printEnv( char **e )
Debug (" %s\n", *e++); Debug (" %s\n", *e++);
} }
static char * static char *
makeEnv( char *name, char *value ) makeEnv( char *name, char *value )
{ {
char *result; char *result;
@ -208,7 +207,7 @@ makeEnv( char *name, char *value )
return result; return result;
} }
char * char *
getEnv( char **e, char *name ) getEnv( char **e, char *name )
{ {
int l = strlen (name); int l = strlen (name);
@ -224,7 +223,7 @@ getEnv( char **e, char *name )
return 0; return 0;
} }
char ** char **
setEnv( char **e, char *name, char *value ) setEnv( char **e, char *name, char *value )
{ {
char **new, **old; char **new, **old;
@ -282,7 +281,7 @@ freeEnv (char **env)
# define isblank(c) ((c) == ' ' || c == '\t') # define isblank(c) ((c) == ' ' || c == '\t')
char ** char **
parseArgs( char **argv, char *string ) parseArgs( char **argv, char *string )
{ {
char *word; char *word;
@ -357,26 +356,26 @@ CleanUpChild( void )
CloseOnFork (); CloseOnFork ();
} }
char * * char * *
parseEnv( char **e, char *string ) parseEnv( char **e, char *string )
{ {
char *s1, *s2, *t1, *t2; char *s1, *s2, *t1, *t2;
s1 = s2 = strdup(string); s1 = s2 = strdup(string);
while ((t1 = strtok(s1," \t")) != NULL ) { while ((t1 = strtok(s1," \t")) != NULL ) {
if ( (t2 = strchr(t1,'=')) != NULL ) { if ( (t2 = strchr(t1,'=')) != NULL ) {
*t2++ = '\0'; *t2++ = '\0';
e = setEnv(e, t1, t2); e = setEnv(e, t1, t2);
} }
s1 = NULL; s1 = NULL;
} }
free(s2); free(s2);
return (e); return (e);
} }
/*************************************<->************************************* /*************************************<->*************************************
* *
@ -392,7 +391,7 @@ parseEnv( char **e, char *string )
* ------ * ------
* dpy = display * dpy = display
* w = window * w = window
* *
* Outputs: * Outputs:
* ------- * -------
* None * None
@ -400,16 +399,16 @@ parseEnv( char **e, char *string )
* Comments: * Comments:
* -------- * --------
* None. (None doesn't count as a comment) * None. (None doesn't count as a comment)
* *
*************************************<->***********************************/ *************************************<->***********************************/
void void
SetHourGlassCursor( Display *dpy, Window w ) SetHourGlassCursor( Display *dpy, Window w )
{ {
Cursor cursor; Cursor cursor;
XUndefineCursor(dpy, w); XUndefineCursor(dpy, w);
cursor = _DtGetHourGlassCursor(dpy); cursor = _DtGetHourGlassCursor(dpy);
XDefineCursor(dpy, w, cursor); XDefineCursor(dpy, w, cursor);
@ -424,7 +423,7 @@ SetHourGlassCursor( Display *dpy, Window w )
* *
* Generate the list of languages installed on the host. * Generate the list of languages installed on the host.
* Result is stored the global array "languageList" * Result is stored the global array "languageList"
* *
***************************************************************************/ ***************************************************************************/
#define DELIM " \t" /* delimiters in language list */ #define DELIM " \t" /* delimiters in language list */
@ -451,7 +450,7 @@ MakeLangList( void )
/* /*
* build language list from set of languages installed on the host... * build language list from set of languages installed on the host...
* Wrap a timer around it so it doesn't hang things up too long. * Wrap a timer around it so it doesn't hang things up too long.
* langListTimeout resource by default is 30 seconds to scan NLS dir. * langListTimeout resource by default is 30 seconds to scan NLS dir.
*/ */
p = languageList; p = languageList;
@ -512,7 +511,7 @@ MakeLangList( void )
free(savelist); free(savelist);
} }
static int static int
@ -521,7 +520,7 @@ MatchesFileSuffix(const char *filename, const char *suffix)
int retval = 0; int retval = 0;
#if defined(_AIX) || defined(SVR4) || defined(__linux__) || defined(CSRG_BASED) #if defined(_AIX) || defined(SVR4) || defined(__linux__) || defined(CSRG_BASED)
int different = 1; int different = 1;
/* /*
* The assumption here is that the use of strrstr is * The assumption here is that the use of strrstr is
* to determine if "dp->d_name" ends in ".cat". * to determine if "dp->d_name" ends in ".cat".
@ -543,7 +542,7 @@ MatchesFileSuffix(const char *filename, const char *suffix)
* Scan a directory structure to see if it contains an installed language. * Scan a directory structure to see if it contains an installed language.
* If so, the name of the language is appended to a global list of languages. * If so, the name of the language is appended to a global list of languages.
* *
* Scan method and scan directory will vary by platform. * Scan method and scan directory will vary by platform.
* *
***************************************************************************/ ***************************************************************************/
@ -610,7 +609,7 @@ ScanNLSDir(char *dirname)
struct stat statb; struct stat statb;
char buf[1024]; char buf[1024];
/* /*
* Scan input directory, looking for a LOCALE file. If a sub-directory * Scan input directory, looking for a LOCALE file. If a sub-directory
* is found, recurse down into it... * is found, recurse down into it...
@ -664,7 +663,7 @@ ScanNLSDir(char *dirname)
continue; continue;
} }
/* /*
* if this file is a directory, scan it also... * if this file is a directory, scan it also...
*/ */
@ -687,12 +686,12 @@ ScanNLSDir(char *dirname)
{ {
DIR *dirp; DIR *dirp;
struct dirent *dp; struct dirent *dp;
char* locale; char* locale;
char locale_path[MAXPATHLEN]; char locale_path[MAXPATHLEN];
struct stat locale_stat; struct stat locale_stat;
int retval; int retval;
/* /*
* To determin the fully installed locale list, check several locations. * To determin the fully installed locale list, check several locations.
*/ */
if(NULL != (dirp = opendir(dirname))) if(NULL != (dirp = opendir(dirname)))
@ -789,8 +788,8 @@ setLang( struct display *d, char **env , char *langptr)
int s = 0; int s = 0;
char *element = NULL; char *element = NULL;
int set_def_lang = FALSE; int set_def_lang = FALSE;
if (NULL != langptr) if (NULL != langptr)
Debug("setLang(): langlist = %s\n", langptr); Debug("setLang(): langlist = %s\n", langptr);
else else
@ -811,13 +810,13 @@ setLang( struct display *d, char **env , char *langptr)
} }
else else
set_def_lang = TRUE; set_def_lang = TRUE;
s += strlen(element) +1; s += strlen(element) +1;
element = strtok(langlist+s, DELIM); element = strtok(langlist+s, DELIM);
} }
} else } else
set_def_lang = TRUE; set_def_lang = TRUE;
if (set_def_lang) { if (set_def_lang) {
env = setEnv(env, "LANG", "C"); env = setEnv(env, "LANG", "C");
d->language = strdup("C"); d->language = strdup("C");
@ -838,4 +837,3 @@ localHostname (void)
} }
return localHostbuf; return localHostbuf;
} }

View file

@ -67,6 +67,8 @@
#include <Xm/TextFP.h> #include <Xm/TextFP.h>
#include <Xm/PushBG.h> #include <Xm/PushBG.h>
#include <Xm/ToggleBG.h> #include <Xm/ToggleBG.h>
#include <Xm/RowColumn.h>
#include <X11/Xlib.h>
#include <Dt/IconFile.h> #include <Dt/IconFile.h>
#include <Dt/Icon.h> #include <Dt/Icon.h>
#include <pwd.h> #include <pwd.h>
@ -1069,7 +1071,7 @@ PostMenuCB( Widget w, XtPointer client_data, XtPointer call_data )
if (p->reason == XmCR_ARM && if (p->reason == XmCR_ARM &&
p->event->type == ButtonPress) { p->event->type == ButtonPress) {
XmMenuPosition(options_menu, p->event); XmMenuPosition(options_menu, (XButtonPressedEvent *)p->event);
XtManageChild(options_menu); XtManageChild(options_menu);
} }
} }

View file

@ -94,6 +94,8 @@ from the X Consortium.
static char auth_name[256]; static char auth_name[256];
static int auth_name_len; static int auth_name_len;
void GenerateAuthData(char *auth, int len); // genauth.c
void void
XdmPrintDataHex(const char *s, const char *a, int l) XdmPrintDataHex(const char *s, const char *a, int l)
{ {

View file

@ -141,6 +141,16 @@ int WellKnownSocketsMax;
#define pS(s) ((s) ? ((char *) (s)) : "empty string") #define pS(s) ((s) ? ((char *) (s)) : "empty string")
/* choose.c */
int RememberIndirectClient(ARRAY8Ptr clientAddress, CARD16 connectionType);
void ForgetIndirectClient(ARRAY8Ptr clientAddress, CARD16 connectionType);
int IsIndirectClient(ARRAY8Ptr clientAddress, CARD16 connectionType);
ARRAY8Ptr IndirectChoice(ARRAY8Ptr clientAddress, CARD16 connectionType);
int ProcessChooserSocket(int fd);
void RunChooser(struct display *d);
void LoadDMResources(void); // resource.c
void void
DestroyWellKnownSockets (void) DestroyWellKnownSockets (void)
{ {