Bug 499

Summary: progressmeter.c doesn't build (at least) on Cygwin
Product: Portable OpenSSH Reporter: Corinna Vinschen <vinschen>
Component: Build systemAssignee: OpenSSH Bugzilla mailing list <openssh-bugs>
Status: CLOSED FIXED    
Severity: critical    
Priority: P2    
Version: -current   
Hardware: ix86   
OS: Cygwin on NT/2k/Win7-11   
Attachments:
Description Flags
Solves the progressmeter.c build problems none

Description Corinna Vinschen 2003-02-19 19:10:57 AEDT
Three bugs:

- libgen.h doesn't exist on all platforms.
- basename() doesn't exist on all platforms.
- ioctl(TIOCGPGRP) doesn't exist on all platforms.  This is a
  reintroduced problem since there was another method used on
  other platforms (calling tcgetpgrp()) when that code was
  still in scp.c

The attached patch solves all three problems, the basename()
problem only for Cygwin, the other problems generally by
adding tests for libgen.h and tcgetpgrp() to configure.ac.
Comment 1 Corinna Vinschen 2003-02-19 19:13:08 AEDT
Created attachment 233 [details]
Solves the progressmeter.c build problems
Comment 2 Damien Miller 2003-02-24 12:56:12 AEDT
Mostly applied - thanks.

I committed everything except for the basename() replacement. Instead, I took
the implementation from OpenBSD libc and added it to openbsd-compat. Please test
and reopen if I have further broken things :)
Comment 3 Corinna Vinschen 2003-02-24 19:23:17 AEDT
Looks good so far but... uhm... shouldn't that be:

Index: openbsd-compat/basename.h
===================================================================
RCS file: /cvs/openssh_cvs/openbsd-compat/basename.h,v
retrieving revision 1.1
diff -p -u -r1.1 basename.h
--- openbsd-compat/basename.h   24 Feb 2003 01:55:56 -0000      1.1
+++ openbsd-compat/basename.h   24 Feb 2003 08:17:42 -0000
@@ -6,7 +6,7 @@
 
 #if !defined(HAVE_BASENAME)
 
-char *getcwd(char *pt, size_t size);
+char *basename(char *path);
 
 #endif /* !defined(HAVE_BASENAME) */
 #endif /* _BASENAME_H */
Comment 4 Damien Miller 2003-03-10 11:25:30 AEDT
Applied a week or two ago.
Comment 5 Damien Miller 2004-04-14 12:24:18 AEST
Mass change of RESOLVED bugs to CLOSED