8
0
mirror of https://github.com/FirebirdSQL/firebird.git synced 2025-02-02 10:00:38 +01:00

Minor 'dirname' cleanup:

o check for the availability in configure
 o removed the ugly test in flu.cpp
 o synchronised config.h.in and MSVC pendant

NOTE: If you have problems on your system, don't change the source.
      Extend the tests in configure.in!!!
This commit is contained in:
eku 2002-08-14 12:27:41 +00:00
parent a5ad017bfc
commit 599ab7de28
4 changed files with 11 additions and 6 deletions

View File

@ -1,4 +1,4 @@
# $Id: configure.in,v 1.27 2002-08-14 12:15:23 eku Exp $
# $Id: configure.in,v 1.28 2002-08-14 12:27:39 eku Exp $
AC_INIT(src)
AC_CONFIG_AUX_DIR(src/make.new/config)
@ -105,7 +105,9 @@ AC_CHECK_LIB(curses, main)
AC_CHECK_LIB(readline, main,,,$LIBS)
AC_CHECK_LIB(stdc++, main,,, $LIBS)
AC_CHECK_FUNCS(strlcpy strlcat gettimeofday time times)
AC_CHECK_FUNCS(strlcpy strlcat)
AC_CHECK_FUNCS(gettimeofday time times)
AC_CHECK_FUNCS(dirname)
AC_C_BIGENDIAN
AC_C_CONST

View File

@ -57,6 +57,7 @@
#define HAVE_GETTIMEOFDAY
#undef HAVE_TIME
#undef HAVE_TIMES
#define HAVE_DIRNAME
/* Types */
#undef socklen_t

View File

@ -27,7 +27,7 @@
*
*/
/*
$Id: flu.cpp,v 1.9 2002-07-04 06:08:51 eku Exp $
$Id: flu.cpp,v 1.10 2002-08-14 12:27:40 eku Exp $
*/
#include "firebird.h"
@ -105,7 +105,7 @@ static int condition_handler(int *, int *, int *);
#define IB_UDF_DIR "UDF/"
#endif
#if defined FREEBSD || defined NETBSD || defined DARWIN
#ifndef HAVE_DIRNAME
/*
* Define our own dirname(), because we don't have a syscall for it.
* !! WARNING !! WARNING !! WARNING !!
@ -116,7 +116,8 @@ static int condition_handler(int *, int *, int *);
* syscall versions do it the same way, except that they probably offer
* thread-safeness as well.
*/
const char* dirname(const char* fname)
const char*
dirname(const char* fname)
{
static char result[512];
int i = 0;
@ -142,7 +143,7 @@ const char* dirname(const char* fname)
result[last] = '\0';
return result;
}
#endif
#endif /* HAVE_DIRNAME */
static void terminate_at_space(char* psz)

View File

@ -47,6 +47,7 @@
#undef HAVE_GETTIMEOFDAY
#undef HAVE_TIME
#undef HAVE_TIMES
#undef HAVE_DIRNAME
/* Types */
#undef socklen_t