X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=blobdiff_plain;f=unix%2Funix.h;h=e78800b5a2d93f02ff53fe83ff85473a594f2701;hb=a063e522970946bf7d5dc052079d7773c0dee76d;hp=feef0fbac9fffcbc1ef44731b3828534054a4438;hpb=aba05b7180b39ee51d72b1da867303c002188f2c;p=PuTTY.git diff --git a/unix/unix.h b/unix/unix.h index feef0fba..e78800b5 100644 --- a/unix/unix.h +++ b/unix/unix.h @@ -24,9 +24,6 @@ struct FontSpec *fontspec_new(const char *name); typedef void *Context; /* FIXME: probably needs changing */ -typedef int OSSocket; -#define OSSOCKET_DEFINED /* stop network.h using its default */ - extern Backend pty_backend; typedef uint32_t uint32; /* C99: uint32_t defined in stdint.h */ @@ -80,6 +77,7 @@ unsigned long getticks(void); /* based on gettimeofday(2) */ char *get_x_display(void *frontend); int font_dimension(void *frontend, int which);/* 0 for width, 1 for height */ long get_windowid(void *frontend); +int frontend_is_utf8(void *frontend); /* Things gtkdlg.c needs from pterm.c */ void *get_window(void *frontend); /* void * to avoid depending on gtk.h */ @@ -88,11 +86,16 @@ void *get_window(void *frontend); /* void * to avoid depending on gtk.h */ int do_config_box(const char *title, Conf *conf, int midsession, int protcfginfo); void fatal_message_box(void *window, char *msg); +void nonfatal_message_box(void *window, char *msg); void about_box(void *window); void *eventlogstuff_new(void); void showeventlog(void *estuff, void *parentwin); void logevent_dlg(void *estuff, const char *string); int reallyclose(void *frontend); +#ifdef MAY_REFER_TO_GTK_IN_HEADERS +int messagebox(GtkWidget *parentwin, char *title, char *msg, int minwid, ...); +int string_width(char *text); +#endif /* Things pterm.c needs from {ptermm,uxputty}.c */ char *make_default_wintitle(char *hostname); @@ -151,7 +154,10 @@ void (*putty_signal(int sig, void (*func)(int)))(int); void block_signal(int sig, int block_it); /* uxmisc.c */ -int cloexec(int); +void cloexec(int); +void noncloexec(int); +int nonblock(int); +int no_nonblock(int); /* * Exports from unicode.c. @@ -165,13 +171,6 @@ int init_ucs(struct unicode_data *ucsdata, char *line_codepage, */ void *sk_getxdmdata(void *sock, int *lenp); -/* - * Function provided by front ends, and called by uxnet.c to indicate - * that net_pending_errors() would like to be called back when the - * front end has a spare moment and isn't deep in any other recursion. - */ -void frontend_net_error_pending(void); - /* * General helpful Unix stuff: more helpful version of the FD_SET * macro, which also handles maxfd. @@ -186,4 +185,9 @@ void frontend_net_error_pending(void); */ extern Backend serial_backend; +/* + * uxpeer.c, wrapping getsockopt(SO_PEERCRED). + */ +int so_peercred(int fd, int *pid, int *uid, int *gid); + #endif