- 论坛徽章:
- 0
|
我在cygwin下用linux环境编程,现在碰到一个问题,想要请教大家。
就是我现在又一些扩展名为diff的补丁文件,然后我上网搜了一下发现diff文件的使用命令是:
patch 待打补丁文件 diff补丁文件
但是我发现有写diff文件是一个补丁文件针对很多文件,就是说一个diff文件要给很多文件打补丁,这样的话如果用上面这个命令就会提示找不到命令,所以我想问下这个问题怎么解决,比如我给出一个diff文件的例子:
diff -Naur orig/cdc/src/win32/javavm/include/wcejpeg_md.h patched/cdc/src/win32/javavm/include/wcejpeg_md.h
--- orig/cdc/src/win32/javavm/include/wcejpeg_md.h 1970-01-01 01:00:00.000000000 +0100
+++ patched/cdc/src/win32/javavm/include/wcejpeg_md.h 2009-05-22 08:55:48.000000000 +0200
@@ -0,0 +1,41 @@
+/*
+ * @(#)wcejpeg_md.h 1.1 07/1/24
+ *
+ * Copyright 2007-2007 Davy Preuveneers. All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License version
+ * 2 only, as published by the Free Software Foundation.
+ *
+ * This program 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
+ * General Public License version 2 for more details (a copy is
+ * included at /legal/license.txt).
+ *
+ * You should have received a copy of the GNU General Public License
+ * version 2 along with this work; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA
+ *
+ */
+
+/*
+ * NOTICE: Portions Copyright (c) 2007-2009 Davy Preuveneers.
+ * This file has been modified by Davy Preuveneers on 2009/01/11. The
+ * changes are licensed under the terms of the GNU General Public
+ * License version 2. This notice was added to meet the conditions of
+ * Section 3.a of the GNU General Public License version 2.
+ */
+
+#ifndef _WIN32_WCEJPEG_MD_H
+#define _WIN32_WCEJPEG_MD_H
+
+#ifdef WINCE
+
+#pragma include_alias("jmorecfg.h", "javavm/include/win32/jmorecfg.h")
+
+#endif /* WINCE */
+
+#endif /* _WIN32_WCEJPEG_MD_H */
diff -Naur orig/cdc/src/win32/javavm/include/win32/jmorecfg.h patched/cdc/src/win32/javavm/include/win32/jmorecfg.h
--- orig/cdc/src/win32/javavm/include/win32/jmorecfg.h 1970-01-01 01:00:00.000000000 +0100
+++ patched/cdc/src/win32/javavm/include/win32/jmorecfg.h 2009-05-22 08:55:48.000000000 +0200
@@ -0,0 +1,55 @@
+/*
+ * @(#)jmorecfg.h 1.1 07/1/24
+ *
+ * Copyright 2007-2007 Davy Preuveneers. All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License version
+ * 2 only, as published by the Free Software Foundation.
+ *
+ * This program 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
+ * General Public License version 2 for more details (a copy is
+ * included at /legal/license.txt).
+ *
+ * You should have received a copy of the GNU General Public License
+ * version 2 along with this work; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA
+ *
+ */
+
+/*
+ * NOTICE: Portions Copyright (c) 2007-2009 Davy Preuveneers.
+ * This file has been modified by Davy Preuveneers on 2009/01/11. The
+ * changes are licensed under the terms of the GNU General Public
+ * License version 2. This notice was added to meet the conditions of
+ * Section 3.a of the GNU General Public License version 2.
+ */
+
+#ifndef _WIN32_JMORECFG_H
+#define _WIN32_JMORECFG_H
+
+#ifdef WINCE
+
+/*
+ * For WinCE devices, "boolean" is already declared as "unsigned char" in
+ * rpcndr.h. Therefore, the redefinition of "boolean" must remain the same.
+ */
+
+#ifndef HAVE_BOOLEAN
+
+typedef unsigned char boolean;
+
+#define HAVE_BOOLEAN
+
+#pragma include_alias ("jmorecfg.h", "../share/basis/native/image/jpeg/lib/jmorecfg.h")
+#include "jmorecfg.h"
+
+#endif
+
+#endif /* WINCE */
+
+#endif /* _WIN32_JMORECFG_H */这个文件就分别给cdc/src/win32/javavm/include/wcejpeg_md.h 和cdc/src/win32/javavm/include/win32/jmorecfg.h文件打补丁,但是如果我写命令
patch cdc/src/win32/javavm/include/wcejpeg_md.h XX.diff
这个命令就会提示我找不到待打包文件
请问我的命令应该怎么写
|
|