You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

172 lines
5.7 KiB

Index: unix/Makefile.gtk
--- unix/Makefile.gtk.orig 2005-04-05 21:40:17 +0200
+++ unix/Makefile.gtk 2005-04-08 18:13:16 +0200
@@ -80,9 +80,9 @@
# You can define this path to point at your tools if you need to
# TOOLPATH = /opt/gcc/bin
-CC = $(TOOLPATH)cc
+CC = gcc
-CFLAGS = -O2 -Wall -Werror -g -I.././ -I../charset/ -I../windows/ -I../unix/ \
+CFLAGS = -O2 -Wall -I.././ -I../charset/ -I../windows/ -I../unix/ \
-I../mac/ -I../macosx/ `gtk-config --cflags`
XLDFLAGS = `gtk-config --libs`
ULDFLAGS =#
@@ -157,14 +157,14 @@
timing.o toucs.o tree234.o utf8.o uxcfg.o uxmisc.o uxprint.o \
uxpterm.o uxpty.o uxsel.o uxsignal.o uxstore.o uxucs.o \
version.o wcwidth.o xenc.o xkeysym.o
- $(CC) $(XLDFLAGS) -o $@ be_none.o cmdline.o config.o dialog.o \
+ $(CC) -o $@ be_none.o cmdline.o config.o dialog.o \
fromucs.o gtkcfg.o gtkcols.o gtkdlg.o gtkpanel.o gtkwin.o \
ldisc.o ldiscucs.o localenc.o logging.o macenc.o mimeenc.o \
minibidi.o misc.o nocproxy.o sbcs.o sbcsdat.o settings.o \
slookup.o terminal.o time.o timing.o toucs.o tree234.o \
utf8.o uxcfg.o uxmisc.o uxprint.o uxpterm.o uxpty.o uxsel.o \
uxsignal.o uxstore.o uxucs.o version.o wcwidth.o xenc.o \
- xkeysym.o
+ xkeysym.o $(XLDFLAGS)
putty: be_all.o cmdline.o config.o cproxy.o dialog.o fromucs.o gtkcfg.o \
gtkcols.o gtkdlg.o gtkpanel.o gtkwin.o ldisc.o ldiscucs.o \
@@ -178,7 +178,7 @@
uxprint.o uxproxy.o uxputty.o uxsel.o uxsignal.o uxstore.o \
uxucs.o version.o wcwidth.o wildcard.o x11fwd.o xenc.o \
xkeysym.o
- $(CC) $(XLDFLAGS) -o $@ be_all.o cmdline.o config.o cproxy.o \
+ $(CC) -o $@ be_all.o cmdline.o config.o cproxy.o \
dialog.o fromucs.o gtkcfg.o gtkcols.o gtkdlg.o gtkpanel.o \
gtkwin.o ldisc.o ldiscucs.o localenc.o logging.o macenc.o \
mimeenc.o minibidi.o misc.o pinger.o portfwd.o proxy.o raw.o \
@@ -189,7 +189,7 @@
timing.o toucs.o tree234.o utf8.o ux_x11.o uxagentc.o \
uxcfg.o uxmisc.o uxnet.o uxnoise.o uxprint.o uxproxy.o \
uxputty.o uxsel.o uxsignal.o uxstore.o uxucs.o version.o \
- wcwidth.o wildcard.o x11fwd.o xenc.o xkeysym.o
+ wcwidth.o wildcard.o x11fwd.o xenc.o xkeysym.o $(XLDFLAGS)
puttygen: cmdgen.o import.o misc.o notiming.o sshaes.o sshbn.o sshdes.o \
sshdss.o sshdssg.o sshmd5.o sshprime.o sshpubk.o sshrand.o \
@@ -209,14 +209,14 @@
toucs.o tree234.o utf8.o uxcfg.o uxmisc.o uxnet.o uxprint.o \
uxproxy.o uxputty.o uxsel.o uxsignal.o uxstore.o uxucs.o \
version.o wcwidth.o xenc.o xkeysym.o
- $(CC) $(XLDFLAGS) -o $@ be_nossh.o cmdline.o config.o dialog.o \
+ $(CC) -o $@ be_nossh.o cmdline.o config.o dialog.o \
fromucs.o gtkcfg.o gtkcols.o gtkdlg.o gtkpanel.o gtkwin.o \
ldisc.o ldiscucs.o localenc.o logging.o macenc.o mimeenc.o \
minibidi.o misc.o nocproxy.o pinger.o proxy.o raw.o rlogin.o \
sbcs.o sbcsdat.o settings.o slookup.o telnet.o terminal.o \
time.o timing.o toucs.o tree234.o utf8.o uxcfg.o uxmisc.o \
uxnet.o uxprint.o uxproxy.o uxputty.o uxsel.o uxsignal.o \
- uxstore.o uxucs.o version.o wcwidth.o xenc.o xkeysym.o
+ uxstore.o uxucs.o version.o wcwidth.o xenc.o xkeysym.o $(XLDFLAGS)
be_all.o: ../be_all.c ../putty.h ../puttyps.h ../network.h ../misc.h \
../windows/winstuff.h ../mac/macstuff.h ../macosx/osx.h \
@@ -828,7 +828,7 @@
version.o: FORCE;
FORCE:
- if test -z "$(VER)" && (cd ..; md5sum -c manifest); then \
+ if test -z "$(VER)" ; then \
$(CC) $(COMPAT) $(XFLAGS) $(CFLAGS) `cat ../version.def` -c ../version.c; \
else \
$(CC) $(COMPAT) $(XFLAGS) $(CFLAGS) $(VER) -c ../version.c; \
@@ -849,8 +849,6 @@
$(INSTALL_PROGRAM) -m 755 puttygen $(DESTDIR)$(bindir)/puttygen
$(INSTALL_PROGRAM) -m 755 puttytel $(DESTDIR)$(bindir)/puttytel
$(INSTALL_DATA) -m 644 ../doc/plink.1 $(DESTDIR)$(man1dir)/plink.1
- $(INSTALL_DATA) -m 644 ../doc/pscp.1 $(DESTDIR)$(man1dir)/pscp.1
- $(INSTALL_DATA) -m 644 ../doc/psftp.1 $(DESTDIR)$(man1dir)/psftp.1
$(INSTALL_DATA) -m 644 ../doc/pterm.1 $(DESTDIR)$(man1dir)/pterm.1
$(INSTALL_DATA) -m 644 ../doc/putty.1 $(DESTDIR)$(man1dir)/putty.1
$(INSTALL_DATA) -m 644 ../doc/puttygen.1 $(DESTDIR)$(man1dir)/puttygen.1
Index: unix/uxucs.c
--- unix/uxucs.c.orig 2005-04-05 21:37:47 +0200
+++ unix/uxucs.c 2005-04-08 18:11:19 +0200
@@ -12,6 +12,67 @@
#include "terminal.h"
#include "misc.h"
+#ifdef __FreeBSD__
+#include <osreldate.h>
+#if __FreeBSD_version <= 500000
+
+#include <errno.h>
+#include <rune.h>
+#include <limits.h>
+
+/*
+ * Emulate the ISO C mbrtowc() function in terms of the deprecated
+ * 4.4BSD sgetrune() function.
+ */
+size_t
+mbrtowc(wchar_t * __restrict pwc, const char * __restrict s,
+ size_t n, mbstate_t * __restrict ps __unused)
+{
+ const char *e;
+ rune_t r;
+
+ if (s == NULL) {
+ pwc = NULL;
+ s = "";
+ n = 1;
+ }
+ if ((r = sgetrune(s, n, &e)) == _INVALID_RUNE) {
+ if (n >= (size_t)MB_CUR_MAX) {
+ errno = EILSEQ;
+ return ((size_t)-1);
+ }
+ return ((size_t)-2);
+ }
+ if (pwc != NULL)
+ *pwc = (wchar_t)r;
+ return (r != 0 ? (size_t)(e - s) : 0);
+}
+
+/*
+ * Emulate the ISO C wcrtomb() function in terms of the deprecated
+ * 4.4BSD sputrune() function.
+ */
+size_t
+wcrtomb(char * __restrict s, wchar_t wc,
+ mbstate_t * __restrict ps __unused)
+{
+ char *e;
+ char buf[MB_LEN_MAX];
+
+ if (s == NULL) {
+ s = buf;
+ wc = L'\0';
+ }
+ sputrune(wc, s, MB_CUR_MAX, &e);
+ if (e == NULL) {
+ errno = EILSEQ;
+ return ((size_t)-1);
+ }
+ return ((size_t)(e - s));
+}
+#endif
+#endif
+
/*
* Unix Unicode-handling routines.
*/
Index: unix/uxpty.c
--- unix/uxpty.c.orig 2005-04-05 21:37:47 +0200
+++ unix/uxpty.c 2005-04-08 18:15:33 +0200
@@ -23,6 +23,12 @@
#include <sys/ioctl.h>
#include <errno.h>
+#ifdef __FreeBSD__
+#include <sys/stat.h>
+#define OMIT_UTMP
+#define BSD_PTYS
+#endif
+
#include "putty.h"
#include "tree234.h"