remove some warning, move gethostname to os_calls
This commit is contained in:
parent
4e6d57dbe5
commit
43e388b7e5
@ -613,7 +613,11 @@ int APP_CC
|
||||
g_sck_get_peer_cred(int sck, int *pid, int *uid, int *gid)
|
||||
{
|
||||
#if defined(SO_PEERCRED)
|
||||
#if defined(_WIN32)
|
||||
int ucred_length;
|
||||
#else
|
||||
unsigned int ucred_length;
|
||||
#endif
|
||||
struct myucred
|
||||
{
|
||||
pid_t pid;
|
||||
@ -3151,7 +3155,7 @@ g_shmat(int shmid)
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/* returns -1 on error */
|
||||
/* returns -1 on error 0 on success */
|
||||
int APP_CC
|
||||
g_shmdt(const void *shmaddr)
|
||||
{
|
||||
@ -3161,3 +3165,11 @@ g_shmdt(const void *shmaddr)
|
||||
return shmdt(shmaddr);
|
||||
#endif
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/* returns -1 on error 0 on success */
|
||||
int APP_CC
|
||||
g_gethostname(char *name, int len)
|
||||
{
|
||||
return gethostname(name, len);
|
||||
}
|
||||
|
@ -163,5 +163,6 @@ int APP_CC g_time3(void);
|
||||
int APP_CC g_text2bool(const char *s);
|
||||
void * APP_CC g_shmat(int shmid);
|
||||
int APP_CC g_shmdt(const void *shmaddr);
|
||||
int APP_CC g_gethostname(char *name, int len);
|
||||
|
||||
#endif
|
||||
|
@ -108,6 +108,8 @@ xrdp_wm_send_bitmap(struct xrdp_wm* self, struct xrdp_bitmap* bitmap,
|
||||
int x, int y, int cx, int cy);
|
||||
int APP_CC
|
||||
xrdp_wm_set_pointer(struct xrdp_wm* self, int cache_idx);
|
||||
unsigned int APP_CC
|
||||
xrdp_wm_htoi (const char *ptr);
|
||||
int APP_CC
|
||||
xrdp_wm_set_focused(struct xrdp_wm* self, struct xrdp_bitmap* wnd);
|
||||
int APP_CC
|
||||
@ -349,6 +351,8 @@ get_keymaps(int keylayout, struct xrdp_keymap* keymap);
|
||||
/* xrdp_login_wnd.c */
|
||||
int APP_CC
|
||||
xrdp_login_wnd_create(struct xrdp_wm* self);
|
||||
int APP_CC
|
||||
load_xrdp_config(struct xrdp_config *config);
|
||||
|
||||
/* xrdp_bitmap_compress.c */
|
||||
int APP_CC
|
||||
|
@ -559,7 +559,7 @@ xrdp_login_wnd_create(struct xrdp_wm *self)
|
||||
|
||||
self->login_window->notify = xrdp_wm_login_notify;
|
||||
|
||||
gethostname(buf1, 256);
|
||||
g_gethostname(buf1, 256);
|
||||
g_sprintf(buf, "Login to %s", buf1);
|
||||
set_string(&self->login_window->caption1, buf);
|
||||
|
||||
@ -642,7 +642,7 @@ xrdp_login_wnd_create(struct xrdp_wm *self)
|
||||
*
|
||||
* @return 0 on success, -1 on failure
|
||||
*****************************************************************************/
|
||||
|
||||
int APP_CC
|
||||
load_xrdp_config(struct xrdp_config *config)
|
||||
{
|
||||
struct xrdp_cfg_globals *globals;
|
||||
|
@ -323,7 +323,8 @@ xrdp_wm_set_pointer(struct xrdp_wm *self, int cache_idx)
|
||||
|
||||
/*****************************************************************************/
|
||||
/* convert hex string to int */
|
||||
unsigned int xrdp_wm_htoi (const char *ptr)
|
||||
unsigned int APP_CC
|
||||
xrdp_wm_htoi (const char *ptr)
|
||||
{
|
||||
unsigned int value = 0;
|
||||
char ch = *ptr;
|
||||
|
Loading…
Reference in New Issue
Block a user