"Fossies" - the Fresh Open Source Software Archive 
Member "tlswrap-1.04/misc.h" (25 Nov 2006, 1802 Bytes) of package /linux/privat/old/tlswrap-1.04.tar.gz:
As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style:
standard) with prefixed line numbers and
code folding option.
Alternatively you can here
view or
download the uninterpreted source code file.
For more information about "misc.h" see the
Fossies "Dox" file reference documentation.
1 #ifndef _MISC_H_
2 #define _MISC_H_
3 #include "tlswrap.h"
4
5 #ifndef HAVE_STRLCPY
6 #include <stdio.h>
7 size_t
8 strlcpy(char *dst, const char *src, size_t siz);
9 #endif
10
11 extern int dns_write_pipe, dns_read_pipe, pipe1[2], pipe2[2];
12
13 #ifndef HAVE_GETOPT
14 #ifndef _GETOPT_DECLARED
15 #define _GETOPT_DECLARED
16 int getopt(int, char * const [], const char *);
17 char *_getprogname(void);
18 extern char *optarg; /* getopt(3) external variables */
19 extern int optind, opterr, optopt;
20 #endif /* _GETOPT_DECLARED */
21 #endif /*!HAVE_GETOPT */
22 void sys_err(const char *);
23 size_t extr_str(const char *, size_t , char *, size_t);
24 int print_to_ud(struct user_data *, const char *);
25 /* int find_max_fd(fd_set *fd_r, fd_set *fd_w); */
26 int find_max_fd(int, struct user_data *, int);
27 void init_ud(struct user_data *, int);
28 int find_free_slot(struct user_data *, int);
29 int print_to_serv(struct user_data *, const char *);
30 void user_close(struct user_data *);
31 void data_close(struct user_data *);
32 #ifdef WIN32
33 #define WIN32_LEAN_AND_MEAN /* Exclude rarely-used stuff from Windows headers */
34 #define BOOL int
35 #define true 1
36 #define false 0
37
38 HANDLE hServiceThread;
39 SERVICE_STATUS_HANDLE nServiceStatusHandle;
40 HANDLE killServiceEvent;
41 DWORD nServiceCurrentStatus;
42 #include <windows.h>
43 #include <winsvc.h>
44 struct parm {
45 int argc;
46 char **argv;
47 };
48 void service_main(DWORD argc, LPTSTR *argv);
49 void service_ctrl_handler(DWORD nControlCode);
50 BOOL update_service_status(DWORD dwCurrentState, DWORD dwWin32ExitCode,
51 DWORD dwServiceSpecificExitCode, DWORD dwCheckPoint,
52 DWORD dwWaitHint);
53 BOOL start_service_thread(void);
54 DWORD service_execution_thread(LPDWORD param);
55 void install_service(char*, char*, int);
56 void remove_service(int);
57 void kill_service(void);
58 BOOL CtrlHandler(DWORD fdwCtrlType);
59 #endif
60 #endif