mirror of
https://github.com/curl/curl.git
synced 2026-08-24 15:23:36 +03:00
tests/server: round of tidy-ups (part 2)
General tidy-ups, to identify and reduce duplications and potential issues, while also making the server modules compile as a single binary. - ensure unique symbols and no shadowing across server sources, by renaming variables. - move globals common to multiple servers into shared `util` module. - drop constants with a single use. - undef macro before re-using them across server sources. - move common functions into shared `util` module. - drop redundant static declarations. - disable IPv6 code when built without IPv6. - start syncing the 3 almost identical copies of `sockdaemon` function. - drop unused `timeval.h` header. - drop `poll()` from `wait_ms()`, for macOS, following an earlier core update. Follow-up toc72cefea0f#15096 Follow-up to9213e4e497#16525 Cherry-picked from #15000 Closes #16609
This commit is contained in:
parent
07f99b72d5
commit
bc55b435af
9 changed files with 369 additions and 430 deletions
|
|
@ -51,14 +51,27 @@ enum {
|
|||
|
||||
char *data_to_hex(char *data, size_t len);
|
||||
void logmsg(const char *msg, ...) CURL_PRINTF(1, 2);
|
||||
void loghex(unsigned char *buffer, ssize_t len);
|
||||
unsigned char byteval(char *value);
|
||||
|
||||
#define SERVERLOGS_LOCKDIR "lock" /* within logdir */
|
||||
|
||||
/* global variable, where to find the 'data' dir */
|
||||
extern const char *path;
|
||||
|
||||
/* global variable, log file name */
|
||||
extern const char *serverlogfile;
|
||||
/* global variables */
|
||||
extern const char *path; /* where to find the 'data' dir */
|
||||
extern const char *pidname;
|
||||
extern const char *portname;
|
||||
extern const char *serverlogfile; /* log file name */
|
||||
extern int serverlogslocked;
|
||||
extern const char *configfile;
|
||||
extern const char *logdir;
|
||||
extern char loglockfile[256];
|
||||
#ifdef USE_IPV6
|
||||
extern bool use_ipv6;
|
||||
#endif
|
||||
extern const char *ipv_inuse;
|
||||
extern unsigned short server_port;
|
||||
extern const char *socket_type;
|
||||
extern int socket_domain;
|
||||
|
||||
#ifdef _WIN32
|
||||
int win32_init(void);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue