diff options
author | Michael R Sweet <michael.r.sweet@gmail.com> | 2018-10-10 00:17:22 -0400 |
---|---|---|
committer | Michael R Sweet <michael.r.sweet@gmail.com> | 2018-10-10 00:17:22 -0400 |
commit | 19dc16f764492eb3b1cf7c57b7f645e214cb9b3a (patch) | |
tree | 1a40bc2a71ace7f53463f8c7f823b6419e648242 /cups/usersys.c | |
parent | d65e20fe7c5b192522ba01865bfcbd3dbc0e448e (diff) | |
download | cups-19dc16f764492eb3b1cf7c57b7f645e214cb9b3a.tar.gz |
Migrate Windows conditional code to _WIN32 define.
Diffstat (limited to 'cups/usersys.c')
-rw-r--r-- | cups/usersys.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/cups/usersys.c b/cups/usersys.c index c6c774e4a..3cf265646 100644 --- a/cups/usersys.c +++ b/cups/usersys.c @@ -14,13 +14,13 @@ #include "cups-private.h" #include <stdlib.h> #include <sys/stat.h> -#ifdef WIN32 +#ifdef _WIN32 # include <windows.h> #else # include <pwd.h> # include <termios.h> # include <sys/utsname.h> -#endif /* WIN32 */ +#endif /* _WIN32 */ /* @@ -484,12 +484,12 @@ cupsSetUserAgent(const char *user_agent)/* I - User-Agent string or @code NULL@ { _cups_globals_t *cg = _cupsGlobals(); /* Thread globals */ -#ifdef WIN32 +#ifdef _WIN32 SYSTEM_INFO sysinfo; /* System information */ OSVERSIONINFO version; /* OS version info */ #else struct utsname name; /* uname info */ -#endif /* WIN32 */ +#endif /* _WIN32 */ if (user_agent) @@ -498,7 +498,7 @@ cupsSetUserAgent(const char *user_agent)/* I - User-Agent string or @code NULL@ return; } -#ifdef WIN32 +#ifdef _WIN32 version.dwOSVersionInfoSize = sizeof(OSVERSIONINFO); GetVersionEx(&version); GetNativeSystemInfo(&sysinfo); @@ -522,7 +522,7 @@ cupsSetUserAgent(const char *user_agent)/* I - User-Agent string or @code NULL@ snprintf(cg->user_agent, sizeof(cg->user_agent), CUPS_MINIMAL " (%s %s; %s) IPP/2.0", name.sysname, name.release, name.machine); -#endif /* WIN32 */ +#endif /* _WIN32 */ } @@ -574,7 +574,7 @@ cupsUserAgent(void) const char * /* O - Password or @code NULL@ if none */ _cupsGetPassword(const char *prompt) /* I - Prompt string */ { -#ifdef WIN32 +#ifdef _WIN32 HANDLE tty; /* Console handle */ DWORD mode; /* Console mode */ char passch, /* Current key press */ @@ -840,7 +840,7 @@ _cupsGetPassword(const char *prompt) /* I - Prompt string */ memset(cg->password, 0, sizeof(cg->password)); return (NULL); } -#endif /* WIN32 */ +#endif /* _WIN32 */ } @@ -899,7 +899,7 @@ _cupsSetDefaults(void) # ifdef HAVE_GETEUID if ((geteuid() == getuid() || !getuid()) && getegid() == getgid() && (home = getenv("HOME")) != NULL) -# elif !defined(WIN32) +# elif !defined(_WIN32) if (getuid() && (home = getenv("HOME")) != NULL) # else if ((home = getenv("HOME")) != NULL) @@ -1095,7 +1095,7 @@ cups_finalize_client_conf( if (!cc->user[0]) { -#ifdef WIN32 +#ifdef _WIN32 /* * Get the current user name from the OS... */ @@ -1131,7 +1131,7 @@ cups_finalize_client_conf( if (pw) strlcpy(cc->user, pw->pw_name, sizeof(cc->user)); else -#endif /* WIN32 */ +#endif /* _WIN32 */ { /* * Use the default "unknown" user name... |