зеркало из https://github.com/github/putty.git
Alexey Savelyev's mkfiles.pl patch to support lcc-win32. This has
caused a small amount of extra inconvenience at the tops of .rc files, but it's been positive overall since lcc has managed to point out some pedantic errors (typically static/extern mismatches between function prototypes and definitions) which everything else missed. [originally from svn r3744]
This commit is contained in:
Родитель
bb2ee13a8a
Коммит
f6adc8a9e1
59
mkfiles.pl
59
mkfiles.pl
|
@ -988,3 +988,62 @@ foreach $arch (qw(PPC Carbon)) {
|
|||
}
|
||||
}
|
||||
select STDOUT; close OUT;
|
||||
|
||||
##-- lcc makefile
|
||||
open OUT, ">Makefile.lcc"; select OUT;
|
||||
print
|
||||
"# Makefile for PuTTY under lcc.\n".
|
||||
"#\n# This file was created by `mkfiles.pl' from the `Recipe' file.\n".
|
||||
"# DO NOT EDIT THIS FILE DIRECTLY; edit Recipe or mkfiles.pl instead.\n";
|
||||
# lcc command line option is -D not /D
|
||||
($_ = $help) =~ s/=\/D/=-D/gs;
|
||||
print $_;
|
||||
print
|
||||
"\n".
|
||||
"# If you rename this file to `Makefile', you should change this line,\n".
|
||||
"# so that the .rsp files still depend on the correct makefile.\n".
|
||||
"MAKEFILE = Makefile.lcc\n".
|
||||
"\n".
|
||||
"# C compilation flags\n".
|
||||
"CFLAGS = -D_WINDOWS\n".
|
||||
"\n".
|
||||
"# Get include directory for resource compiler\n".
|
||||
"\n".
|
||||
".c.obj:\n".
|
||||
&splitline("\tlcc -O -p6 \$(COMPAT) \$(FWHACK)".
|
||||
" \$(XFLAGS) \$(CFLAGS) \$*.c",69)."\n".
|
||||
".rc.res:\n".
|
||||
&splitline("\tlrc \$(FWHACK) \$(RCFL) -r \$*.rc",69)."\n".
|
||||
"\n";
|
||||
print &splitline("all:" . join "", map { " $_.exe" } &progrealnames("GC"));
|
||||
print "\n\n";
|
||||
foreach $p (&prognames("GC")) {
|
||||
($prog, $type) = split ",", $p;
|
||||
$objstr = &objects($p, "X.obj", "X.res", undef);
|
||||
print &splitline("$prog.exe: " . $objstr ), "\n";
|
||||
$subsystemtype = undef;
|
||||
if ($prog eq "pageant" || $prog eq "putty" ||$prog eq "puttygen" || $prog eq "puttytel") {
|
||||
$subsystemtype = "-subsystem windows"; }
|
||||
my $libss = "shell32.lib wsock32.lib ws2_32.lib winspool.lib winmm.lib imm32.lib";
|
||||
print &splitline("\tlcclnk $subsystemtype -o $prog.exe $objstr $libss");
|
||||
print "\n\n";
|
||||
}
|
||||
|
||||
|
||||
foreach $d (&deps("X.obj", "X.res", "", "\\")) {
|
||||
print &splitline(sprintf("%s: %s", $d->{obj}, join " ", @{$d->{deps}})),
|
||||
"\n";
|
||||
}
|
||||
print
|
||||
"\n".
|
||||
"version.o: FORCE\n".
|
||||
"# Hack to force version.o to be rebuilt always\n".
|
||||
"FORCE:\n".
|
||||
"\tlcc \$(FWHACK) \$(VER) \$(CFLAGS) /c version.c\n\n".
|
||||
"clean:\n".
|
||||
"\t-del *.obj\n".
|
||||
"\t-del *.exe\n".
|
||||
"\t-del *.res\n";
|
||||
|
||||
select STDOUT; close OUT;
|
||||
|
||||
|
|
|
@ -13,6 +13,8 @@
|
|||
#include "misc.h"
|
||||
#include "tree234.h"
|
||||
|
||||
#include <shellapi.h>
|
||||
|
||||
#ifndef NO_SECURITY
|
||||
#include <aclapi.h>
|
||||
#endif
|
||||
|
@ -49,7 +51,7 @@ static HMENU systray_menu, session_menu;
|
|||
static int already_running;
|
||||
static int requested_help;
|
||||
|
||||
static char *help_path;
|
||||
char *help_path;
|
||||
static char *putty_path;
|
||||
|
||||
#define IDM_PUTTY 0x0060
|
||||
|
|
|
@ -1,4 +1,8 @@
|
|||
/* Some compilers, like Borland, don't have winresrc.h */
|
||||
#ifdef __LCC__
|
||||
#include <win.h>
|
||||
#else
|
||||
|
||||
#ifndef NO_WINRESRC_H
|
||||
#ifndef MSVC4
|
||||
#include <winresrc.h>
|
||||
|
@ -7,6 +11,8 @@
|
|||
#endif
|
||||
#endif
|
||||
|
||||
#endif /* end #ifdef __LCC__
|
||||
|
||||
/* Some systems don't define this, so I do it myself if necessary */
|
||||
#ifndef RT_MANIFEST
|
||||
#define RT_MANIFEST 24
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
*/
|
||||
|
||||
#include "putty.h"
|
||||
#include <winspool.h>
|
||||
|
||||
struct printer_enum_tag {
|
||||
int nprinters;
|
||||
|
|
|
@ -1,4 +1,8 @@
|
|||
/* Some compilers, like Borland, don't have winresrc.h */
|
||||
#ifdef __LCC__
|
||||
#include <win.h>
|
||||
#else
|
||||
|
||||
#ifndef NO_WINRESRC_H
|
||||
#ifndef MSVC4
|
||||
#include <winresrc.h>
|
||||
|
@ -7,6 +11,8 @@
|
|||
#endif
|
||||
#endif
|
||||
|
||||
#endif /* end #ifdef __LCC__
|
||||
|
||||
/* Some systems don't define this, so I do it myself if necessary */
|
||||
#ifndef RT_MANIFEST
|
||||
#define RT_MANIFEST 24
|
||||
|
|
|
@ -1,4 +1,8 @@
|
|||
/* Some compilers, like Borland, don't have winresrc.h */
|
||||
#ifdef __LCC__
|
||||
#include <win.h>
|
||||
#else
|
||||
|
||||
#ifndef NO_WINRESRC_H
|
||||
#ifndef MSVC4
|
||||
#include <winresrc.h>
|
||||
|
@ -7,6 +11,8 @@
|
|||
#endif
|
||||
#endif
|
||||
|
||||
#endif /* end #ifdef __LCC__
|
||||
|
||||
/* Some systems don't define this, so I do it myself if necessary */
|
||||
#ifndef TCS_MULTILINE
|
||||
#define TCS_MULTILINE 0x0200
|
||||
|
|
1
windlg.c
1
windlg.c
|
@ -13,6 +13,7 @@
|
|||
|
||||
#include <commctrl.h>
|
||||
#include <commdlg.h>
|
||||
#include <shellapi.h>
|
||||
|
||||
#ifdef MSVC4
|
||||
#define TVINSERTSTRUCT TV_INSERTSTRUCT
|
||||
|
|
9
window.c
9
window.c
|
@ -110,7 +110,6 @@ static struct unicode_data ucsdata;
|
|||
static int session_closed;
|
||||
|
||||
static const struct telnet_special *specials;
|
||||
static int specials_menu_position;
|
||||
|
||||
static struct {
|
||||
HMENU menu;
|
||||
|
@ -4601,7 +4600,7 @@ char *get_window_title(void *frontend, int icon)
|
|||
/*
|
||||
* See if we're in full-screen mode.
|
||||
*/
|
||||
int is_full_screen()
|
||||
static int is_full_screen()
|
||||
{
|
||||
if (!IsZoomed(hwnd))
|
||||
return FALSE;
|
||||
|
@ -4640,7 +4639,7 @@ static int get_fullscreen_rect(RECT * ss)
|
|||
* Go full-screen. This should only be called when we are already
|
||||
* maximised.
|
||||
*/
|
||||
void make_full_screen()
|
||||
static void make_full_screen()
|
||||
{
|
||||
DWORD style;
|
||||
RECT ss;
|
||||
|
@ -4674,7 +4673,7 @@ void make_full_screen()
|
|||
/*
|
||||
* Clear the full-screen attributes.
|
||||
*/
|
||||
void clear_full_screen()
|
||||
static void clear_full_screen()
|
||||
{
|
||||
DWORD oldstyle, style;
|
||||
|
||||
|
@ -4704,7 +4703,7 @@ void clear_full_screen()
|
|||
/*
|
||||
* Toggle full-screen mode.
|
||||
*/
|
||||
void flip_full_screen()
|
||||
static void flip_full_screen()
|
||||
{
|
||||
if (is_full_screen()) {
|
||||
ShowWindow(hwnd, SW_RESTORE);
|
||||
|
|
Загрузка…
Ссылка в новой задаче