1
1

Merge branch '1915_smbfs_build_fixups'

* 1915_smbfs_build_fixups:
  Replaced WITH_SMBFS by ENABLE_VFS_SMB
  vfs/smb: removed own obsolete and broken substitution of strchr
  vfs/smb: configure script fixups (for breaks on -Werror)
  Ticket : vfs/smb: fixed breakage on strcpy()/strcat()
Этот коммит содержится в:
Enrico Weigelt, metux IT service 2010-01-02 16:30:06 +01:00
родитель 251bd24025 8c9619cef1
Коммит ae2b21f547
11 изменённых файлов: 35 добавлений и 43 удалений

@ -8,7 +8,7 @@ AC_DEFUN([AC_MC_VFS_SAMBA],
AC_ARG_WITH(samba,
[ --with-samba Support smb virtual file system [[no]]],
[if test x"$withval" != x"no"; then
AC_DEFINE(WITH_SMBFS, 1, [Define to enable VFS over SMB])
AC_DEFINE(ENABLE_VFS_SMB, 1, [Define to enable VFS over SMB])
vfs_flags="$vfs_flags, smbfs"
use_smbfs=yes
fi

@ -145,14 +145,14 @@ static const GOptionEntry argument_main_table[] = {
N_("Log ftp dialog to specified file"),
"<file>"
},
#ifdef WITH_SMBFS
#ifdef ENABLE_VFS_SMB
{
"debuglevel", 'D', G_OPTION_FLAG_IN_MAIN, G_OPTION_ARG_INT,
&mc_args__debug_level,
N_("Set debug level"),
"<integer>"
},
#endif
#endif /* ENABLE_VFS_SMB */
#endif
/* single file operations */

@ -972,7 +972,7 @@ jobs_cmd (void)
}
#endif /* WITH_BACKGROUND */
#ifdef WITH_SMBFS
#ifdef ENABLE_VFS_SMB
struct smb_authinfo *
vfs_smb_get_authinfo (const char *host, const char *share, const char *domain,
const char *user)
@ -1078,4 +1078,4 @@ vfs_smb_get_authinfo (const char *host, const char *share, const char *domain,
return return_value;
}
#endif /* WITH_SMBFS */
#endif /* ENABLE_VFS_SMB */

@ -1171,14 +1171,14 @@ void fishlink_cmd (void)
"/#sh:", 1);
}
#ifdef WITH_SMBFS
#ifdef ENABLE_VFS_SMB
void smblink_cmd (void)
{
nice_cd (_(" SMB link to machine "), _(machine_str),
"[SMB File System]", ":smblink_cmd: SMB link to machine ",
"/#smb:", 0);
}
#endif /* WITH_SMBFS */
#endif /* ENABLE_VFS_SMB */
#endif /* USE_NETCODE */
#ifdef USE_EXT2FSLIB

@ -342,9 +342,9 @@ static name_keymap_t command_names[] = {
{ "CmdReverseSelection", CK_ReverseSelectionCmd },
{ "CmdSaveSetup", CK_SaveSetupCmd },
{ "CmdSelect", CK_SelectCmd },
#if defined (USE_NETCODE) && defined (WITH_SMBFS)
#if defined (USE_NETCODE) && defined (ENABLE_VFS_SMB)
{ "CmdSmblinkCmd", CK_SmblinkCmd },
#endif
#endif /* USE_NETCODE || ENABLE_VFS_SMB
{ "CmdSwapPanel", CK_SwapCmd },
{ "CmdSymlink", CK_SymlinkCmd },
{ "CmdTree", CK_TreeCmd },

@ -87,9 +87,9 @@
#include "main.h"
#ifdef WITH_SMBFS
#ifdef ENABLE_VFS_SMB
#include "../vfs/smbfs.h" /* smbfs_set_debug() */
#endif
#endif /* ENABLE_VFS_SMB */
#ifdef USE_INTERNAL_EDIT
# include "../edit/edit.h"
@ -692,9 +692,9 @@ create_panel_menu (void)
#endif
entries = g_list_append (entries, menu_entry_create (_("FT&P link..."), CK_FtplinkCmd));
entries = g_list_append (entries, menu_entry_create (_("S&hell link..."), CK_FishlinkCmd));
#ifdef WITH_SMBFS
#ifdef ENABLE_VFS_SMB
entries = g_list_append (entries, menu_entry_create (_("SM&B link..."), CK_SmblinkCmd));
#endif
#endif /* ENABLE_VFS_SMB */
#endif
entries = g_list_append (entries, menu_separator_create ());
entries = g_list_append (entries, menu_entry_create (_("&Rescan"), CK_RereadCmd));
@ -1321,11 +1321,11 @@ midnight_execute_cmd (Widget *sender, unsigned long command)
case CK_SingleDirsizeCmd:
smart_dirsize_cmd ();
break;
#if defined (USE_NETCODE) && defined (WITH_SMBFS)
#if defined (USE_NETCODE) && defined (ENABLE_VFS_SMB)
case CK_SmblinkCmd:
smblink_cmd ();
break;
#endif
#endif /* USE_NETCODE && ENABLE_VFS_SMB */
case CK_Sort:
sort_cmd ();
break;
@ -2018,15 +2018,15 @@ mc_main__setup_by_args (int argc, char *argv[])
#ifdef USE_NETCODE
if (mc_args__netfs_logfile != NULL) {
mc_setctl ("/#ftp:", VFS_SETCTL_LOGFILE, (void *) mc_args__netfs_logfile);
#ifdef WITH_SMBFS
#ifdef ENABLE_VFS_SMB
smbfs_set_debugf (mc_args__netfs_logfile);
#endif /* WITH_SMBFS */
#endif /* ENABLE_VFS_SMB */
}
#ifdef WITH_SMBFS
#ifdef ENABLE_VFS_SMB
if (mc_args__debug_level != 0)
smbfs_set_debug (mc_args__debug_level);
#endif /* WITH_SMBFS */
#endif /* ENABLE_VFS_SMB */
#endif /* USE_NETCODE */
base = x_basename (argv[0]);

@ -44,9 +44,9 @@ static const char *const vfs_supported[] = {
# ifdef ENABLE_VFS_MCFS
"mcfs",
# endif
# ifdef WITH_SMBFS
# ifdef ENABLE_VFS_SMB
"smbfs",
# endif
# endif /* ENABLE_VFS_SMB */
#endif /* USE_NETCODE */
#ifdef USE_EXT2FSLIB
"undelfs",

@ -132,7 +132,7 @@ if test x"$ac_cv_func_connect" = x"no"; then
fi
AC_CHECK_FUNCS(waitpid getcwd strtoul chown chmod)
AC_CHECK_FUNCS(fstat strchr utime utimes getrlimit fsync memset)
AC_CHECK_FUNCS(fstat utime utimes getrlimit fsync memset)
AC_CHECK_FUNCS(memmove vsnprintf snprintf setsid glob pipe crypt16 getauthuid)
AC_CHECK_FUNCS(sigprocmask sigblock sigaction innetgr setnetgrent getnetgrent endnetgrent)
AC_CHECK_FUNCS(initgroups select rdchk getgrnam pathconf)
@ -228,7 +228,9 @@ esac
################
AC_CACHE_CHECK([for long long],samba_cv_have_longlong,[
AC_TRY_RUN([#include <stdio.h>
AC_TRY_RUN([
#include <stdio.h>
#include <stdlib.h>
main() { long long x = 1000000; x *= x; exit(((x/1000000) == 1000000)? 0: 1); }],
samba_cv_have_longlong=yes,samba_cv_have_longlong=no,samba_cv_have_longlong=cross)])
if test x"$samba_cv_have_longlong" = x"yes"; then
@ -263,6 +265,7 @@ AC_CACHE_CHECK([if gettimeofday takes tz argument],samba_cv_HAVE_GETTIMEOFDAY_TZ
AC_TRY_RUN([
#include <sys/time.h>
#include <unistd.h>
#include <stdlib.h>
main() { struct timeval tv; exit(gettimeofday(&tv, NULL));}],
samba_cv_HAVE_GETTIMEOFDAY_TZ=yes,samba_cv_HAVE_GETTIMEOFDAY_TZ=no,samba_cv_HAVE_GETTIMEOFDAY_TZ=cross)])
if test x"$samba_cv_HAVE_GETTIMEOFDAY_TZ" = x"yes"; then
@ -271,7 +274,9 @@ fi
AC_CACHE_CHECK([for broken readdir],samba_cv_HAVE_BROKEN_READDIR,[
AC_TRY_RUN([#include <sys/types.h>
AC_TRY_RUN([
#include <sys/types.h>
#include <stdlib.h>
#include <dirent.h>
main() { struct dirent *di; DIR *d = opendir("."); di = readdir(d);
if (di && di->d_name[-2] == '.' && di->d_name[-1] == 0 &&
@ -559,6 +564,8 @@ AC_ARG_WITH(codepagedir,
AC_MSG_CHECKING([configure summary])
AC_TRY_RUN([
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
main()
{

@ -454,11 +454,6 @@
#define MAX(a,b) ((a)>(b)?(a):(b))
#endif
#ifndef HAVE_STRCHR
# define strchr index
# define strrchr rindex
#endif
#ifdef HAVE_BROKEN_GETGROUPS
#define GID_T int
#else
@ -484,16 +479,6 @@
/***** automatically generated prototypes *****/
#include "proto.h"
#ifdef strcpy
#undef strcpy
#endif /* strcpy */
#define strcpy(dest,src) __ERROR__XX__NEVER_USE_STRCPY___;
#ifdef strcat
#undef strcat
#endif /* strcat */
#define strcat(dest,src) __ERROR__XX__NEVER_USE_STRCAT___;
#ifdef sprintf
#undef sprintf
#endif /* sprintf */

@ -113,7 +113,7 @@ union vfs_dirent {
/* Register a file system class */
int vfs_register_class (struct vfs_class *vfs);
#ifdef WITH_SMBFS
#ifdef ENABLE_VFS_SMB
/* Interface for requesting SMB credentials. */
struct smb_authinfo {
char *host;
@ -127,7 +127,7 @@ struct smb_authinfo *vfs_smb_get_authinfo (const char *host,
const char *share,
const char *domain,
const char *user);
#endif /* WITH_SMBFS */
#endif /* ENABLE_VFS_SMB */
struct vfs_class *vfs_get_class (const char *path);
struct vfs_class *vfs_split (char *path, char **inpath, char **op);

@ -1287,9 +1287,9 @@ vfs_init (void)
tcp_init();
init_ftpfs ();
init_fish ();
#ifdef WITH_SMBFS
#ifdef ENABLE_VFS_SMB
init_smbfs ();
#endif /* WITH_SMBFS */
#endif /* ENABLE_VFS_SMB */
#ifdef ENABLE_VFS_MCFS
init_mcfs ();
#endif /* ENABLE_VFS_MCFS */