Bug 499 - progressmeter.c doesn't build (at least) on Cygwin
Summary: progressmeter.c doesn't build (at least) on Cygwin
Status: CLOSED FIXED
Alias: None
Product: Portable OpenSSH
Classification: Unclassified
Component: Build system (show other bugs)
Version: -current
Hardware: ix86 Cygwin on NT/2k/Win7-11
: P2 critical
Assignee: OpenSSH Bugzilla mailing list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-02-19 19:10 AEDT by Corinna Vinschen
Modified: 2004-04-14 12:24 AEST (History)
0 users

See Also:


Attachments
Solves the progressmeter.c build problems (3.73 KB, patch)
2003-02-19 19:13 AEDT, Corinna Vinschen
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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