basename() in libgen

Albert Chin openssh-unix-dev at thewrittenword.com
Wed Apr 2 02:54:09 EST 2003


On Tue, Apr 01, 2003 at 08:53:33AM +0900, Ayamura KIKUCHI wrote:
> IRIX 6.5 has the basename() function in libgen.
> 
> SYNOPSIS
>     cc [flag ...] file ... -lgen [library ...]
> 
>     #include <libgen.h>
>     char *basename (char *path);

Fixed with the patch below.

-- 
albert chin (china at thewrittenword.com)

-- snip snip
--- configure.ac.orig	2003-04-01 10:07:27.116989000 -0600
+++ configure.ac	2003-04-01 10:41:59.273282000 -0600
@@ -604,7 +583,7 @@
 
 dnl    Checks for library functions. Please keep in alphabetical order
 AC_CHECK_FUNCS(\
-	arc4random __b64_ntop b64_ntop __b64_pton b64_pton basename bcopy \
+	arc4random __b64_ntop b64_ntop __b64_pton b64_pton bcopy \
 	bindresvport_sa clock fchmod fchown freeaddrinfo futimes \
 	gai_strerror getaddrinfo getcwd getgrouplist getnameinfo getopt \
 	getpeereid _getpty getrlimit getrusage getttyent glob inet_aton \
@@ -617,6 +596,7 @@
 	sysconf tcgetpgrp truncate utimes vhangup vsnprintf waitpid \
 )
 
+AC_SEARCH_LIBS(basename, gen, AC_DEFINE(HAVE_BASENAME))
 AC_SEARCH_LIBS(nanosleep, rt posix4, AC_DEFINE(HAVE_NANOSLEEP))
 
 dnl Make sure strsep prototype is defined before defining HAVE_STRSEP




More information about the openssh-unix-dev mailing list