Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --- WINDOWS/WINNET.C Tue Jul 12 19:13:34 2011
- +++ WINDOWS/WINNET.C Tue Aug 16 20:56:27 2011
- @@ -1695,8 +1695,8 @@
- return hostname;
- }
- -SockAddr platform_get_x11_unix_address(const char *display, int displaynum,
- - char **canonicalname)
- +SockAddr platform_get_x11_unix_address(const char *display, int displaynum /*,
- + char **canonicalname*/)
- {
- SockAddr ret = snew(struct SockAddr_tag);
- memset(ret, 0, sizeof(struct SockAddr_tag));
- --- WINDOWS/WINPGNTC.C Wed Jun 08 21:47:08 2011
- +++ WINDOWS/WINPGNTC.C Tue Aug 16 21:28:47 2011
- @@ -86,7 +86,7 @@
- (PSECURITY_DESCRIPTOR, DWORD));
- DECL_WINDOWS_FUNCTION(static, BOOL, SetSecurityDescriptorOwner,
- (PSECURITY_DESCRIPTOR, PSID, BOOL));
- -DECL_WINDOWS_FUNCTION(, DWORD, GetSecurityInfo,
- +DECL_WINDOWS_FUNCTION(DECL_WINDOWS_FUNCTION_NOLINKAGE, DWORD, GetSecurityInfo,
- (HANDLE, SE_OBJECT_TYPE, SECURITY_INFORMATION,
- PSID *, PSID *, PACL *, PACL *,
- PSECURITY_DESCRIPTOR *));
- --- WINDOWS/WINPLINK.C Mon Sep 14 22:26:48 2009
- +++ WINDOWS/WINPLINK.C Tue Aug 16 22:05:13 2011
- @@ -273,7 +273,7 @@
- }
- }
- -int main(int argc, char **argv)
- +int DECLSPEC_CDECL main(int argc, char *argv[])
- {
- int sending;
- int portnumber = -1;
- @@ -628,7 +628,7 @@
- QS_POSTMESSAGE);
- if ((unsigned)(n - WAIT_OBJECT_0) < (unsigned)nhandles) {
- handle_got_event(handles[n - WAIT_OBJECT_0]);
- - } else if (n == WAIT_OBJECT_0 + nhandles) {
- + } else if ((unsigned)n == WAIT_OBJECT_0 + nhandles) {
- WSANETWORKEVENTS things;
- SOCKET socket;
- extern SOCKET first_socket(int *), next_socket(int *);
- @@ -689,7 +689,7 @@
- }
- }
- }
- - } else if (n == WAIT_OBJECT_0 + nhandles + 1) {
- + } else if ((unsigned)n == WAIT_OBJECT_0 + nhandles + 1) {
- MSG msg;
- while (PeekMessage(&msg, INVALID_HANDLE_VALUE,
- WM_AGENT_CALLBACK, WM_AGENT_CALLBACK,
- --- WINDOWS/WINSFTP.C Sun Sep 27 16:52:14 2009
- +++ WINDOWS/WINSFTP.C Tue Aug 16 21:18:30 2011
- @@ -71,7 +71,7 @@
- #define TIME_POSIX_TO_WIN(t, ft) do { \
- ULARGE_INTEGER uli; \
- - uli.QuadPart = ((ULONGLONG)(t) + 11644473600ull) * 10000000ull; \
- + uli.QuadPart = ((ULONGLONG)(t) + MK_UINT64(11644473600)) * MK_UINT64(10000000); \
- (ft).dwLowDateTime = uli.LowPart; \
- (ft).dwHighDateTime = uli.HighPart; \
- } while(0)
- @@ -79,7 +79,7 @@
- ULARGE_INTEGER uli; \
- uli.LowPart = (ft).dwLowDateTime; \
- uli.HighPart = (ft).dwHighDateTime; \
- - uli.QuadPart = uli.QuadPart / 10000000ull - 11644473600ull; \
- + uli.QuadPart = uli.QuadPart / MK_UINT64(10000000) - MK_UINT64(11644473600); \
- (t) = (unsigned long) uli.QuadPart; \
- } while(0)
- --- WINDOWS/WINSTUFF.H Wed Jun 08 21:47:08 2011
- +++ WINDOWS/WINSTUFF.H Tue Aug 16 21:45:30 2011
- @@ -15,6 +15,14 @@
- #include "winhelp.h"
- +#ifdef _MSC_VER
- +#define DECLSPEC_CDECL __cdecl
- +#endif
- +#ifdef __GNUC_PATCHLEVEL__
- +#define DECLSPEC_CDECL __attribute__((cdecl))
- +#endif
- +
- +
- struct Filename {
- char path[FILENAME_MAX];
- };
- @@ -99,6 +107,8 @@
- (p_##name = module ? (t_##name) GetProcAddress(module, STR(name)) : NULL)
- #define GET_WINDOWS_FUNCTION(module, name) \
- (p_##name = module ? (t_##name) GetProcAddress(module, #name) : NULL)
- +
- +#define DECL_WINDOWS_FUNCTION_NOLINKAGE /* MSVC6 cannot handle empty macro parameter */
- /*
- * Global variables. Most modules declare these `extern', but
- --- CONFIG.C Fri Jan 14 19:57:00 2011
- +++ CONFIG.C Tue Aug 16 21:53:27 2011
- @@ -812,7 +812,7 @@
- left = lenof(cfg->ttymodes);
- while (*p) {
- int t = strchr(p, '\t') - p;
- - if (t == strlen(ttymodes[ind]) &&
- + if (t == (int)strlen(ttymodes[ind]) &&
- strncmp(p, ttymodes[ind], t) == 0) {
- memmove(p, p+strlen(p)+1, left - (strlen(p)+1));
- continue;
- @@ -842,7 +842,7 @@
- int ind = 0;
- val++;
- while (ttymodes[ind]) {
- - if (strlen(ttymodes[ind]) == val-p-1 &&
- + if ((signed)strlen(ttymodes[ind]) == val-p-1 &&
- !strncmp(ttymodes[ind], p, val-p-1))
- break;
- ind++;
- --- MISC.H Sun Apr 23 19:26:04 2006
- +++ MISC.H Tue Aug 16 21:17:39 2011
- @@ -129,4 +129,21 @@
- (cp)[0] = (unsigned char)((value) >> 8), \
- (cp)[1] = (unsigned char)(value) )
- +
- +
- +/*
- + * Trick compilers without ULL suffix support
- + */
- +#ifdef _MSC_VER
- +#if (_MSC_VER <= 1200) /* VC6, but what about 2003 and 2005? */
- +#define MK_UINT64(n) MK_UINT64_MSVCINLINE((n))
- +__forceinline unsigned __int64 MK_UINT64_MSVCINLINE(unsigned __int64 n)
- + {return n;}
- +#endif
- +#endif
- +#ifndef MK_UINT64
- +#define MK_UINT64(n) (n##ULL)
- +#endif
- +
- +
- #endif
- --- PSCP.C Fri Aug 07 01:19:04 2009
- +++ PSCP.C Tue Aug 16 21:48:16 2011
- @@ -647,7 +647,7 @@
- /* ----------------------------------------------------------------------
- * sftp-based replacement for the hacky `pscp -ls'.
- */
- -static int sftp_ls_compare(const void *av, const void *bv)
- +static int DECLSPEC_CDECL sftp_ls_compare(const void *av, const void *bv)
- {
- const struct fxp_name *a = (const struct fxp_name *) av;
- const struct fxp_name *b = (const struct fxp_name *) bv;
- --- PSFTP.C Tue Mar 01 23:04:38 2011
- +++ PSFTP.C Tue Aug 16 21:49:01 2011
- @@ -178,7 +178,7 @@
- * qsort comparison routine for fxp_name structures. Sorts by real
- * file name.
- */
- -static int sftp_name_compare(const void *av, const void *bv)
- +static int DECLSPEC_CDECL sftp_name_compare(const void *av, const void *bv)
- {
- const struct fxp_name *const *a = (const struct fxp_name *const *) av;
- const struct fxp_name *const *b = (const struct fxp_name *const *) bv;
- @@ -188,7 +188,7 @@
- /*
- * Likewise, but for a bare char *.
- */
- -static int bare_name_compare(const void *av, const void *bv)
- +static int DECLSPEC_CDECL bare_name_compare(const void *av, const void *bv)
- {
- const char **a = (const char **) av;
- const char **b = (const char **) bv;
- --- PUTTYPS.H Sat Sep 25 09:37:30 2010
- +++ PUTTYPS.H Tue Aug 16 21:37:42 2011
- @@ -19,4 +19,8 @@
- #endif
- +#ifndef DECLSPEC_CDECL
- +#define DECLSPEC_CDECL
- +#endif
- +
- #endif
- --- SETTINGS.C Sat Jun 25 18:37:32 2011
- +++ SETTINGS.C Tue Aug 16 21:46:35 2011
- @@ -918,7 +918,7 @@
- load_settings(session, cfg);
- }
- -static int sessioncmp(const void *av, const void *bv)
- +static int DECLSPEC_CDECL sessioncmp(const void *av, const void *bv)
- {
- const char *a = *(const char *const *) av;
- const char *b = *(const char *const *) bv;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement