[Wine-patches] [eter-1.0.12] eterbug #7103

Alexander Morozov amorozov на etersoft.ru
Вт Апр 12 16:56:18 MSD 2011


----------- следующая часть -----------
From 03b56c44e6f9d396f7357f0f26eba13a1f18a657 Mon Sep 17 00:00:00 2001
From: Alexander Morozov <amorozov на etersoft.ru>
Date: Tue, 12 Apr 2011 16:42:16 +0400
Subject: [eter-1.0.12 1/2] kernel32: Replace command.com with cmd.exe
 (eterbug #7103).

---
 dlls/kernel32/process.c |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/dlls/kernel32/process.c b/dlls/kernel32/process.c
index 986f897..15bc054 100644
--- a/dlls/kernel32/process.c
+++ b/dlls/kernel32/process.c
@@ -133,6 +133,9 @@ static inline int is_special_env_var( const char *var )
  */
 static BOOL get_builtin_path( const WCHAR *libname, const WCHAR *ext, WCHAR *filename, UINT size )
 {
+    static const WCHAR commandW[] = {'c','o','m','m','a','n','d',0};
+    static const WCHAR command_comW[] = {'c','o','m','m','a','n','d','.','c','o','m',0};
+    static const WCHAR cmdW[] = {'c','m','d','.','e','x','e',0};
     WCHAR *file_part;
     UINT len = strlenW( DIR_System );
 
@@ -155,6 +158,10 @@ static BOOL get_builtin_path( const WCHAR *libname, const WCHAR *ext, WCHAR *fil
         if (file_part > filename && file_part[-1] != '\\') *file_part++ = '\\';
         strcpyW( file_part, libname );
     }
+    /* replace command[.com] with cmd.exe (HACK for eterbug #7103) */
+    if (!strcmpiW( file_part, commandW ) || !strcmpiW( file_part, command_comW ))
+        /* cmdW is not longer than commandW and command_comW */
+        strcpyW( file_part, cmdW );
     if (ext && !strchrW( file_part, '.' ))
     {
         if (file_part + strlenW(file_part) + strlenW(ext) + 1 > filename + size)
-- 
1.7.4.4

----------- следующая часть -----------
From a43c2717014aa995d03868e0205a7cbc16282f44 Mon Sep 17 00:00:00 2001
From: Andrew Nguyen <anguyen на codeweavers.com>
Date: Mon, 16 Aug 2010 02:54:00 -0500
Subject: [eter-1.0.12 2/2] ipconfig: Add stub implementation.

---
 configure                     |   10 ++++++++++
 configure.ac                  |    1 +
 programs/ipconfig/Makefile.in |   14 ++++++++++++++
 programs/ipconfig/ipconfig.c  |   31 +++++++++++++++++++++++++++++++
 4 files changed, 56 insertions(+), 0 deletions(-)
 create mode 100644 programs/ipconfig/Makefile.in
 create mode 100644 programs/ipconfig/ipconfig.c

diff --git a/configure b/configure
index f989e95..8fef790 100755
--- a/configure
+++ b/configure
@@ -17497,6 +17497,15 @@ programs/iexplore/Makefile: programs/iexplore/Makefile.in programs/Makeprog.rule
 ac_config_files="$ac_config_files programs/iexplore/Makefile"
 
 ALL_MAKEFILES="$ALL_MAKEFILES \\
+	programs/ipconfig/Makefile"
+test "x$enable_ipconfig" != xno && ALL_PROGRAM_DIRS="$ALL_PROGRAM_DIRS \\
+	ipconfig" && ALL_PROGRAM_INSTALL_DIRS="$ALL_PROGRAM_INSTALL_DIRS \\
+	ipconfig"
+ALL_MAKEFILE_DEPENDS="$ALL_MAKEFILE_DEPENDS
+programs/ipconfig/Makefile: programs/ipconfig/Makefile.in programs/Makeprog.rules"
+ac_config_files="$ac_config_files programs/ipconfig/Makefile"
+
+ALL_MAKEFILES="$ALL_MAKEFILES \\
 	programs/lodctr/Makefile"
 test "x$enable_lodctr" != xno && ALL_PROGRAM_DIRS="$ALL_PROGRAM_DIRS \\
 	lodctr" && ALL_PROGRAM_INSTALL_DIRS="$ALL_PROGRAM_INSTALL_DIRS \\
@@ -19096,6 +19105,7 @@ do
     "programs/hh/Makefile") CONFIG_FILES="$CONFIG_FILES programs/hh/Makefile" ;;
     "programs/icinfo/Makefile") CONFIG_FILES="$CONFIG_FILES programs/icinfo/Makefile" ;;
     "programs/iexplore/Makefile") CONFIG_FILES="$CONFIG_FILES programs/iexplore/Makefile" ;;
+    "programs/ipconfig/Makefile") CONFIG_FILES="$CONFIG_FILES programs/ipconfig/Makefile" ;;
     "programs/lodctr/Makefile") CONFIG_FILES="$CONFIG_FILES programs/lodctr/Makefile" ;;
     "programs/msiexec/Makefile") CONFIG_FILES="$CONFIG_FILES programs/msiexec/Makefile" ;;
     "programs/net/Makefile") CONFIG_FILES="$CONFIG_FILES programs/net/Makefile" ;;
diff --git a/configure.ac b/configure.ac
index 3eb7a6d..6e10139 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2394,6 +2394,7 @@ WINE_CONFIG_MAKEFILE([programs/extrac32/Makefile],[programs/Makeprog.rules],[pro
 WINE_CONFIG_MAKEFILE([programs/hh/Makefile],[programs/Makeprog.rules],[programs],[ALL_PROGRAM_DIRS,ALL_PROGRAM_INSTALL_DIRS])
 WINE_CONFIG_MAKEFILE([programs/icinfo/Makefile],[programs/Makeprog.rules],[programs],[ALL_PROGRAM_DIRS,ALL_PROGRAM_INSTALL_DIRS])
 WINE_CONFIG_MAKEFILE([programs/iexplore/Makefile],[programs/Makeprog.rules],[programs],[ALL_PROGRAM_DIRS,ALL_PROGRAM_INSTALL_DIRS])
+WINE_CONFIG_MAKEFILE([programs/ipconfig/Makefile],[programs/Makeprog.rules],[programs],[ALL_PROGRAM_DIRS,ALL_PROGRAM_INSTALL_DIRS])
 WINE_CONFIG_MAKEFILE([programs/lodctr/Makefile],[programs/Makeprog.rules],[programs],[ALL_PROGRAM_DIRS,ALL_PROGRAM_INSTALL_DIRS])
 WINE_CONFIG_MAKEFILE([programs/msiexec/Makefile],[programs/Makeprog.rules],[programs],[ALL_PROGRAM_DIRS,ALL_PROGRAM_INSTALL_DIRS,ALL_PROGRAM_BIN_INSTALL_DIRS])
 WINE_CONFIG_MAKEFILE([programs/net/Makefile],[programs/Makeprog.rules],[programs],[ALL_PROGRAM_DIRS,ALL_PROGRAM_INSTALL_DIRS])
diff --git a/programs/ipconfig/Makefile.in b/programs/ipconfig/Makefile.in
new file mode 100644
index 0000000..0bc8cfe
--- /dev/null
+++ b/programs/ipconfig/Makefile.in
@@ -0,0 +1,14 @@
+EXTRADEFS = -DWINE_NO_UNICODE_MACROS
+TOPSRCDIR = @top_srcdir@
+TOPOBJDIR = ../..
+SRCDIR    = @srcdir@
+VPATH     = @srcdir@
+MODULE    = ipconfig.exe
+APPMODE   = -mconsole -municode
+IMPORTS   = kernel32
+
+C_SRCS = ipconfig.c
+
+ на MAKE_PROG_RULES@
+
+ на DEPENDENCIES@  # everything below this line is overwritten by make depend
diff --git a/programs/ipconfig/ipconfig.c b/programs/ipconfig/ipconfig.c
new file mode 100644
index 0000000..fc5d95c
--- /dev/null
+++ b/programs/ipconfig/ipconfig.c
@@ -0,0 +1,31 @@
+/*
+ * IP configuration utility
+ *
+ * Copyright 2010 Andrew Nguyen
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+#include <windows.h>
+#include <wine/debug.h>
+#include <wine/unicode.h>
+
+WINE_DEFAULT_DEBUG_CHANNEL(ipconfig);
+
+int wmain(int argc, WCHAR *argv[])
+{
+    WINE_FIXME("ipconfig.exe is not implemented\n");
+    return 0;
+}
-- 
1.7.4.4



Подробная информация о списке рассылки Wine-patches