* [ptxdist] [PATCH] canfestival: Two new patches that make canfestival headers more robust
@ 2020-04-29 20:59 Uwe Kleine-König
2020-05-07 8:14 ` Michael Olbrich
2020-05-08 8:53 ` Michael Olbrich
0 siblings, 2 replies; 5+ messages in thread
From: Uwe Kleine-König @ 2020-04-29 20:59 UTC (permalink / raw)
To: ptxdist
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
...4-let-canfestival.h-include-config.h.patch | 39 ++++++
....-instead-of-include-.-for-own-files.patch | 118 ++++++++++++++++++
patches/canfestival-3+hg20180126.794/series | 4 +-
3 files changed, 160 insertions(+), 1 deletion(-)
create mode 100644 patches/canfestival-3+hg20180126.794/0004-let-canfestival.h-include-config.h.patch
create mode 100644 patches/canfestival-3+hg20180126.794/0005-Use-include-.-instead-of-include-.-for-own-files.patch
diff --git a/patches/canfestival-3+hg20180126.794/0004-let-canfestival.h-include-config.h.patch b/patches/canfestival-3+hg20180126.794/0004-let-canfestival.h-include-config.h.patch
new file mode 100644
index 000000000000..c6b005703e03
--- /dev/null
+++ b/patches/canfestival-3+hg20180126.794/0004-let-canfestival.h-include-config.h.patch
@@ -0,0 +1,39 @@
+From: =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= <u.kleine-koenig@pengutronix.de>
+Date: Mon, 29 Jan 2018 14:07:18 +0100
+Subject: [PATCH] let canfestival.h include config.h
+
+This is necessary to make the header self-contained. Otherwise it is necessary to do
+
+ #include <config.h>
+ #include <canfestival.h>
+
+in the API user which might pull in a local config.h.
+---
+ include/sdo.h | 1 +
+ include/unix/canfestival.h | 1 +
+ 2 files changed, 2 insertions(+)
+
+diff --git a/include/sdo.h b/include/sdo.h
+index 28b8c5c414eb..7863bb5c05a0 100644
+--- a/include/sdo.h
++++ b/include/sdo.h
+@@ -36,6 +36,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+ struct struct_s_transfer;
+
++#include "config.h"
+ #include "timer.h"
+
+ /* Block mode : Data consumer receive step
+diff --git a/include/unix/canfestival.h b/include/unix/canfestival.h
+index f20e593dcf89..ee2a0bc0c4ae 100755
+--- a/include/unix/canfestival.h
++++ b/include/unix/canfestival.h
+@@ -5,6 +5,7 @@
+ extern "C" {
+ #endif
+
++#include "config.h"
+ #include "timerscfg.h"
+ #include "can_driver.h"
+ #include "data.h"
diff --git a/patches/canfestival-3+hg20180126.794/0005-Use-include-.-instead-of-include-.-for-own-files.patch b/patches/canfestival-3+hg20180126.794/0005-Use-include-.-instead-of-include-.-for-own-files.patch
new file mode 100644
index 000000000000..8feaa48a8416
--- /dev/null
+++ b/patches/canfestival-3+hg20180126.794/0005-Use-include-.-instead-of-include-.-for-own-files.patch
@@ -0,0 +1,118 @@
+From: =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= <u.kleine-koenig@pengutronix.de>
+Date: Wed, 29 Apr 2020 22:54:55 +0200
+Subject: [PATCH] Use #include "..." instead of #include <...> for own files
+
+This fixes inclusion if the consumer used
+
+ #include <canfestival/canfestival.h>
+
+(and not -I/usr/include/canfestival) as with
+
+ #include <...>
+
+the local files are not found in this case.
+---
+ include/emcy.h | 2 +-
+ include/lifegrd.h | 2 +-
+ include/nmtSlave.h | 2 +-
+ include/objacces.h | 2 +-
+ include/pdo.h | 4 ++--
+ include/states.h | 2 +-
+ include/timer.h | 4 ++--
+ 7 files changed, 9 insertions(+), 9 deletions(-)
+
+diff --git a/include/emcy.h b/include/emcy.h
+index d3a19eb6d335..ad7ce933eebd 100644
+--- a/include/emcy.h
++++ b/include/emcy.h
+@@ -39,7 +39,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ #define __emcy_h__
+
+
+-#include <applicfg.h>
++#include "applicfg.h"
+
+ /* The error states
+ * ----------------- */
+diff --git a/include/lifegrd.h b/include/lifegrd.h
+index a0600a717038..222a3dd18f73 100644
+--- a/include/lifegrd.h
++++ b/include/lifegrd.h
+@@ -53,7 +53,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ #define __lifegrd_h__
+
+
+-#include <applicfg.h>
++#include "applicfg.h"
+
+ typedef void (*heartbeatError_t)(CO_Data*, UNS8);
+ void _heartbeatError(CO_Data* d, UNS8 heartbeatID);
+diff --git a/include/nmtSlave.h b/include/nmtSlave.h
+index 0a57ae878364..ffb720194e15 100755
+--- a/include/nmtSlave.h
++++ b/include/nmtSlave.h
+@@ -28,7 +28,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ #ifndef __nmtSlave_h__
+ #define __nmtSlave_h__
+
+-#include <applicfg.h>
++#include "applicfg.h"
+ #include "data.h"
+
+ /**
+diff --git a/include/objacces.h b/include/objacces.h
+index 26a96542a4ca..05dd46d313d7 100755
+--- a/include/objacces.h
++++ b/include/objacces.h
+@@ -39,7 +39,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ #ifndef __objacces_h__
+ #define __objacces_h__
+
+-#include <applicfg.h>
++#include "applicfg.h"
+
+
+ #ifdef __cplusplus
+diff --git a/include/pdo.h b/include/pdo.h
+index d276d51734fc..713167f50071 100755
+--- a/include/pdo.h
++++ b/include/pdo.h
+@@ -29,8 +29,8 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ #ifndef __pdo_h__
+ #define __pdo_h__
+
+-#include <applicfg.h>
+-#include <def.h>
++#include "applicfg.h"
++#include "def.h"
+
+ #include "can.h"
+
+diff --git a/include/states.h b/include/states.h
+index 6615a3debe02..804267113bd6 100644
+--- a/include/states.h
++++ b/include/states.h
+@@ -27,7 +27,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ #ifndef __states_h__
+ #define __states_h__
+
+-#include <applicfg.h>
++#include "applicfg.h"
+
+ /* The nodes states
+ * -----------------
+diff --git a/include/timer.h b/include/timer.h
+index bbf4f98e4f5e..836563021093 100755
+--- a/include/timer.h
++++ b/include/timer.h
+@@ -23,8 +23,8 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ #ifndef __timer_h__
+ #define __timer_h__
+
+-#include <timerscfg.h>
+-#include <applicfg.h>
++#include "timerscfg.h"
++#include "applicfg.h"
+
+ #define TIMER_HANDLE INTEGER16
+
diff --git a/patches/canfestival-3+hg20180126.794/series b/patches/canfestival-3+hg20180126.794/series
index 5bad73b7227b..73f9b660f25f 100644
--- a/patches/canfestival-3+hg20180126.794/series
+++ b/patches/canfestival-3+hg20180126.794/series
@@ -3,4 +3,6 @@
0001-fix-for-ldconfig-crash-on-make-install.patch
0002-fix-for-CAN-ID-byteorder.patch
0003-Makefile.in-fix-suffix-rules.patch
-# dd854f5028c1d8578c6dffd44f0d1f06 - git-ptx-patches magic
+0004-let-canfestival.h-include-config.h.patch
+0005-Use-include-.-instead-of-include-.-for-own-files.patch
+# 3c7ac338090e2d1acca872cb33f8371f - git-ptx-patches magic
--
2.26.2
_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [ptxdist] [PATCH] canfestival: Two new patches that make canfestival headers more robust
2020-04-29 20:59 [ptxdist] [PATCH] canfestival: Two new patches that make canfestival headers more robust Uwe Kleine-König
@ 2020-05-07 8:14 ` Michael Olbrich
2020-05-08 8:53 ` Michael Olbrich
1 sibling, 0 replies; 5+ messages in thread
From: Michael Olbrich @ 2020-05-07 8:14 UTC (permalink / raw)
To: ptxdist; +Cc: Uwe Kleine-König
On Wed, Apr 29, 2020 at 10:59:36PM +0200, Uwe Kleine-König wrote:
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Right. So canfestival will probably move to staging in the near future
because it still uses Python 2 at build-time. If we want to keep it
long-term then someone must port it to Python 3.
Michael
> ---
> ...4-let-canfestival.h-include-config.h.patch | 39 ++++++
> ....-instead-of-include-.-for-own-files.patch | 118 ++++++++++++++++++
> patches/canfestival-3+hg20180126.794/series | 4 +-
> 3 files changed, 160 insertions(+), 1 deletion(-)
> create mode 100644 patches/canfestival-3+hg20180126.794/0004-let-canfestival.h-include-config.h.patch
> create mode 100644 patches/canfestival-3+hg20180126.794/0005-Use-include-.-instead-of-include-.-for-own-files.patch
>
> diff --git a/patches/canfestival-3+hg20180126.794/0004-let-canfestival.h-include-config.h.patch b/patches/canfestival-3+hg20180126.794/0004-let-canfestival.h-include-config.h.patch
> new file mode 100644
> index 000000000000..c6b005703e03
> --- /dev/null
> +++ b/patches/canfestival-3+hg20180126.794/0004-let-canfestival.h-include-config.h.patch
> @@ -0,0 +1,39 @@
> +From: =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= <u.kleine-koenig@pengutronix.de>
> +Date: Mon, 29 Jan 2018 14:07:18 +0100
> +Subject: [PATCH] let canfestival.h include config.h
> +
> +This is necessary to make the header self-contained. Otherwise it is necessary to do
> +
> + #include <config.h>
> + #include <canfestival.h>
> +
> +in the API user which might pull in a local config.h.
> +---
> + include/sdo.h | 1 +
> + include/unix/canfestival.h | 1 +
> + 2 files changed, 2 insertions(+)
> +
> +diff --git a/include/sdo.h b/include/sdo.h
> +index 28b8c5c414eb..7863bb5c05a0 100644
> +--- a/include/sdo.h
> ++++ b/include/sdo.h
> +@@ -36,6 +36,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
> +
> + struct struct_s_transfer;
> +
> ++#include "config.h"
> + #include "timer.h"
> +
> + /* Block mode : Data consumer receive step
> +diff --git a/include/unix/canfestival.h b/include/unix/canfestival.h
> +index f20e593dcf89..ee2a0bc0c4ae 100755
> +--- a/include/unix/canfestival.h
> ++++ b/include/unix/canfestival.h
> +@@ -5,6 +5,7 @@
> + extern "C" {
> + #endif
> +
> ++#include "config.h"
> + #include "timerscfg.h"
> + #include "can_driver.h"
> + #include "data.h"
> diff --git a/patches/canfestival-3+hg20180126.794/0005-Use-include-.-instead-of-include-.-for-own-files.patch b/patches/canfestival-3+hg20180126.794/0005-Use-include-.-instead-of-include-.-for-own-files.patch
> new file mode 100644
> index 000000000000..8feaa48a8416
> --- /dev/null
> +++ b/patches/canfestival-3+hg20180126.794/0005-Use-include-.-instead-of-include-.-for-own-files.patch
> @@ -0,0 +1,118 @@
> +From: =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= <u.kleine-koenig@pengutronix.de>
> +Date: Wed, 29 Apr 2020 22:54:55 +0200
> +Subject: [PATCH] Use #include "..." instead of #include <...> for own files
> +
> +This fixes inclusion if the consumer used
> +
> + #include <canfestival/canfestival.h>
> +
> +(and not -I/usr/include/canfestival) as with
> +
> + #include <...>
> +
> +the local files are not found in this case.
> +---
> + include/emcy.h | 2 +-
> + include/lifegrd.h | 2 +-
> + include/nmtSlave.h | 2 +-
> + include/objacces.h | 2 +-
> + include/pdo.h | 4 ++--
> + include/states.h | 2 +-
> + include/timer.h | 4 ++--
> + 7 files changed, 9 insertions(+), 9 deletions(-)
> +
> +diff --git a/include/emcy.h b/include/emcy.h
> +index d3a19eb6d335..ad7ce933eebd 100644
> +--- a/include/emcy.h
> ++++ b/include/emcy.h
> +@@ -39,7 +39,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
> + #define __emcy_h__
> +
> +
> +-#include <applicfg.h>
> ++#include "applicfg.h"
> +
> + /* The error states
> + * ----------------- */
> +diff --git a/include/lifegrd.h b/include/lifegrd.h
> +index a0600a717038..222a3dd18f73 100644
> +--- a/include/lifegrd.h
> ++++ b/include/lifegrd.h
> +@@ -53,7 +53,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
> + #define __lifegrd_h__
> +
> +
> +-#include <applicfg.h>
> ++#include "applicfg.h"
> +
> + typedef void (*heartbeatError_t)(CO_Data*, UNS8);
> + void _heartbeatError(CO_Data* d, UNS8 heartbeatID);
> +diff --git a/include/nmtSlave.h b/include/nmtSlave.h
> +index 0a57ae878364..ffb720194e15 100755
> +--- a/include/nmtSlave.h
> ++++ b/include/nmtSlave.h
> +@@ -28,7 +28,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
> + #ifndef __nmtSlave_h__
> + #define __nmtSlave_h__
> +
> +-#include <applicfg.h>
> ++#include "applicfg.h"
> + #include "data.h"
> +
> + /**
> +diff --git a/include/objacces.h b/include/objacces.h
> +index 26a96542a4ca..05dd46d313d7 100755
> +--- a/include/objacces.h
> ++++ b/include/objacces.h
> +@@ -39,7 +39,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
> + #ifndef __objacces_h__
> + #define __objacces_h__
> +
> +-#include <applicfg.h>
> ++#include "applicfg.h"
> +
> +
> + #ifdef __cplusplus
> +diff --git a/include/pdo.h b/include/pdo.h
> +index d276d51734fc..713167f50071 100755
> +--- a/include/pdo.h
> ++++ b/include/pdo.h
> +@@ -29,8 +29,8 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
> + #ifndef __pdo_h__
> + #define __pdo_h__
> +
> +-#include <applicfg.h>
> +-#include <def.h>
> ++#include "applicfg.h"
> ++#include "def.h"
> +
> + #include "can.h"
> +
> +diff --git a/include/states.h b/include/states.h
> +index 6615a3debe02..804267113bd6 100644
> +--- a/include/states.h
> ++++ b/include/states.h
> +@@ -27,7 +27,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
> + #ifndef __states_h__
> + #define __states_h__
> +
> +-#include <applicfg.h>
> ++#include "applicfg.h"
> +
> + /* The nodes states
> + * -----------------
> +diff --git a/include/timer.h b/include/timer.h
> +index bbf4f98e4f5e..836563021093 100755
> +--- a/include/timer.h
> ++++ b/include/timer.h
> +@@ -23,8 +23,8 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
> + #ifndef __timer_h__
> + #define __timer_h__
> +
> +-#include <timerscfg.h>
> +-#include <applicfg.h>
> ++#include "timerscfg.h"
> ++#include "applicfg.h"
> +
> + #define TIMER_HANDLE INTEGER16
> +
> diff --git a/patches/canfestival-3+hg20180126.794/series b/patches/canfestival-3+hg20180126.794/series
> index 5bad73b7227b..73f9b660f25f 100644
> --- a/patches/canfestival-3+hg20180126.794/series
> +++ b/patches/canfestival-3+hg20180126.794/series
> @@ -3,4 +3,6 @@
> 0001-fix-for-ldconfig-crash-on-make-install.patch
> 0002-fix-for-CAN-ID-byteorder.patch
> 0003-Makefile.in-fix-suffix-rules.patch
> -# dd854f5028c1d8578c6dffd44f0d1f06 - git-ptx-patches magic
> +0004-let-canfestival.h-include-config.h.patch
> +0005-Use-include-.-instead-of-include-.-for-own-files.patch
> +# 3c7ac338090e2d1acca872cb33f8371f - git-ptx-patches magic
> --
> 2.26.2
>
>
> _______________________________________________
> ptxdist mailing list
> ptxdist@pengutronix.de
--
Pengutronix e.K. | |
Steuerwalder Str. 21 | http://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [ptxdist] [PATCH] canfestival: Two new patches that make canfestival headers more robust
2020-04-29 20:59 [ptxdist] [PATCH] canfestival: Two new patches that make canfestival headers more robust Uwe Kleine-König
2020-05-07 8:14 ` Michael Olbrich
@ 2020-05-08 8:53 ` Michael Olbrich
1 sibling, 0 replies; 5+ messages in thread
From: Michael Olbrich @ 2020-05-08 8:53 UTC (permalink / raw)
To: ptxdist
On Wed, Apr 29, 2020 at 10:59:36PM +0200, Uwe Kleine-König wrote:
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Applying patch 0005-Use-include-.-instead-of-include-.-for-own-files.patch
patching file include/emcy.h
patching file include/lifegrd.h
patching file include/nmtSlave.h
patching file include/objacces.h
Hunk #1 FAILED at 39 (different line endings).
1 out of 1 hunk FAILED -- rejects in file include/objacces.h
patching file include/pdo.h
patching file include/states.h
patching file include/timer.h
Patch 0005-Use-include-.-instead-of-include-.-for-own-files.patch does not
apply (enforce with -f)
I'm not sure what happend here.
Michael
> ---
> ...4-let-canfestival.h-include-config.h.patch | 39 ++++++
> ....-instead-of-include-.-for-own-files.patch | 118 ++++++++++++++++++
> patches/canfestival-3+hg20180126.794/series | 4 +-
> 3 files changed, 160 insertions(+), 1 deletion(-)
> create mode 100644 patches/canfestival-3+hg20180126.794/0004-let-canfestival.h-include-config.h.patch
> create mode 100644 patches/canfestival-3+hg20180126.794/0005-Use-include-.-instead-of-include-.-for-own-files.patch
>
> diff --git a/patches/canfestival-3+hg20180126.794/0004-let-canfestival.h-include-config.h.patch b/patches/canfestival-3+hg20180126.794/0004-let-canfestival.h-include-config.h.patch
> new file mode 100644
> index 000000000000..c6b005703e03
> --- /dev/null
> +++ b/patches/canfestival-3+hg20180126.794/0004-let-canfestival.h-include-config.h.patch
> @@ -0,0 +1,39 @@
> +From: =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= <u.kleine-koenig@pengutronix.de>
> +Date: Mon, 29 Jan 2018 14:07:18 +0100
> +Subject: [PATCH] let canfestival.h include config.h
> +
> +This is necessary to make the header self-contained. Otherwise it is necessary to do
> +
> + #include <config.h>
> + #include <canfestival.h>
> +
> +in the API user which might pull in a local config.h.
> +---
> + include/sdo.h | 1 +
> + include/unix/canfestival.h | 1 +
> + 2 files changed, 2 insertions(+)
> +
> +diff --git a/include/sdo.h b/include/sdo.h
> +index 28b8c5c414eb..7863bb5c05a0 100644
> +--- a/include/sdo.h
> ++++ b/include/sdo.h
> +@@ -36,6 +36,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
> +
> + struct struct_s_transfer;
> +
> ++#include "config.h"
> + #include "timer.h"
> +
> + /* Block mode : Data consumer receive step
> +diff --git a/include/unix/canfestival.h b/include/unix/canfestival.h
> +index f20e593dcf89..ee2a0bc0c4ae 100755
> +--- a/include/unix/canfestival.h
> ++++ b/include/unix/canfestival.h
> +@@ -5,6 +5,7 @@
> + extern "C" {
> + #endif
> +
> ++#include "config.h"
> + #include "timerscfg.h"
> + #include "can_driver.h"
> + #include "data.h"
> diff --git a/patches/canfestival-3+hg20180126.794/0005-Use-include-.-instead-of-include-.-for-own-files.patch b/patches/canfestival-3+hg20180126.794/0005-Use-include-.-instead-of-include-.-for-own-files.patch
> new file mode 100644
> index 000000000000..8feaa48a8416
> --- /dev/null
> +++ b/patches/canfestival-3+hg20180126.794/0005-Use-include-.-instead-of-include-.-for-own-files.patch
> @@ -0,0 +1,118 @@
> +From: =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= <u.kleine-koenig@pengutronix.de>
> +Date: Wed, 29 Apr 2020 22:54:55 +0200
> +Subject: [PATCH] Use #include "..." instead of #include <...> for own files
> +
> +This fixes inclusion if the consumer used
> +
> + #include <canfestival/canfestival.h>
> +
> +(and not -I/usr/include/canfestival) as with
> +
> + #include <...>
> +
> +the local files are not found in this case.
> +---
> + include/emcy.h | 2 +-
> + include/lifegrd.h | 2 +-
> + include/nmtSlave.h | 2 +-
> + include/objacces.h | 2 +-
> + include/pdo.h | 4 ++--
> + include/states.h | 2 +-
> + include/timer.h | 4 ++--
> + 7 files changed, 9 insertions(+), 9 deletions(-)
> +
> +diff --git a/include/emcy.h b/include/emcy.h
> +index d3a19eb6d335..ad7ce933eebd 100644
> +--- a/include/emcy.h
> ++++ b/include/emcy.h
> +@@ -39,7 +39,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
> + #define __emcy_h__
> +
> +
> +-#include <applicfg.h>
> ++#include "applicfg.h"
> +
> + /* The error states
> + * ----------------- */
> +diff --git a/include/lifegrd.h b/include/lifegrd.h
> +index a0600a717038..222a3dd18f73 100644
> +--- a/include/lifegrd.h
> ++++ b/include/lifegrd.h
> +@@ -53,7 +53,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
> + #define __lifegrd_h__
> +
> +
> +-#include <applicfg.h>
> ++#include "applicfg.h"
> +
> + typedef void (*heartbeatError_t)(CO_Data*, UNS8);
> + void _heartbeatError(CO_Data* d, UNS8 heartbeatID);
> +diff --git a/include/nmtSlave.h b/include/nmtSlave.h
> +index 0a57ae878364..ffb720194e15 100755
> +--- a/include/nmtSlave.h
> ++++ b/include/nmtSlave.h
> +@@ -28,7 +28,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
> + #ifndef __nmtSlave_h__
> + #define __nmtSlave_h__
> +
> +-#include <applicfg.h>
> ++#include "applicfg.h"
> + #include "data.h"
> +
> + /**
> +diff --git a/include/objacces.h b/include/objacces.h
> +index 26a96542a4ca..05dd46d313d7 100755
> +--- a/include/objacces.h
> ++++ b/include/objacces.h
> +@@ -39,7 +39,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
> + #ifndef __objacces_h__
> + #define __objacces_h__
> +
> +-#include <applicfg.h>
> ++#include "applicfg.h"
> +
> +
> + #ifdef __cplusplus
> +diff --git a/include/pdo.h b/include/pdo.h
> +index d276d51734fc..713167f50071 100755
> +--- a/include/pdo.h
> ++++ b/include/pdo.h
> +@@ -29,8 +29,8 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
> + #ifndef __pdo_h__
> + #define __pdo_h__
> +
> +-#include <applicfg.h>
> +-#include <def.h>
> ++#include "applicfg.h"
> ++#include "def.h"
> +
> + #include "can.h"
> +
> +diff --git a/include/states.h b/include/states.h
> +index 6615a3debe02..804267113bd6 100644
> +--- a/include/states.h
> ++++ b/include/states.h
> +@@ -27,7 +27,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
> + #ifndef __states_h__
> + #define __states_h__
> +
> +-#include <applicfg.h>
> ++#include "applicfg.h"
> +
> + /* The nodes states
> + * -----------------
> +diff --git a/include/timer.h b/include/timer.h
> +index bbf4f98e4f5e..836563021093 100755
> +--- a/include/timer.h
> ++++ b/include/timer.h
> +@@ -23,8 +23,8 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
> + #ifndef __timer_h__
> + #define __timer_h__
> +
> +-#include <timerscfg.h>
> +-#include <applicfg.h>
> ++#include "timerscfg.h"
> ++#include "applicfg.h"
> +
> + #define TIMER_HANDLE INTEGER16
> +
> diff --git a/patches/canfestival-3+hg20180126.794/series b/patches/canfestival-3+hg20180126.794/series
> index 5bad73b7227b..73f9b660f25f 100644
> --- a/patches/canfestival-3+hg20180126.794/series
> +++ b/patches/canfestival-3+hg20180126.794/series
> @@ -3,4 +3,6 @@
> 0001-fix-for-ldconfig-crash-on-make-install.patch
> 0002-fix-for-CAN-ID-byteorder.patch
> 0003-Makefile.in-fix-suffix-rules.patch
> -# dd854f5028c1d8578c6dffd44f0d1f06 - git-ptx-patches magic
> +0004-let-canfestival.h-include-config.h.patch
> +0005-Use-include-.-instead-of-include-.-for-own-files.patch
> +# 3c7ac338090e2d1acca872cb33f8371f - git-ptx-patches magic
> --
> 2.26.2
>
>
> _______________________________________________
> ptxdist mailing list
> ptxdist@pengutronix.de
--
Pengutronix e.K. | |
Steuerwalder Str. 21 | http://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [ptxdist] [PATCH] canfestival: Two new patches that make canfestival headers more robust
2021-02-23 20:45 Uwe Kleine-König
@ 2021-02-24 14:16 ` Michael Olbrich
0 siblings, 0 replies; 5+ messages in thread
From: Michael Olbrich @ 2021-02-24 14:16 UTC (permalink / raw)
To: ptxdist
On Tue, Feb 23, 2021 at 09:45:43PM +0100, Uwe Kleine-König wrote:
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> ---
> Hello,
>
> I already sent this patch approx. a year ago, for reasons I didn't try
> to understand the added patches failed to apply for Michael Olbrich.
> Since then they were used unmodified in a BSP without issues, so I'm
> resending for another try.
It still fails, but I noticed why:
include/objacces.h uses DOS line breaks and I assume those got lost in the
email. I'll fix this here.
Michael
> ...4-let-canfestival.h-include-config.h.patch | 39 ++++++
> ....-instead-of-include-.-for-own-files.patch | 118 ++++++++++++++++++
> patches/canfestival-3+hg20180126.794/series | 4 +-
> 3 files changed, 160 insertions(+), 1 deletion(-)
> create mode 100644 patches/canfestival-3+hg20180126.794/0004-let-canfestival.h-include-config.h.patch
> create mode 100644 patches/canfestival-3+hg20180126.794/0005-Use-include-.-instead-of-include-.-for-own-files.patch
>
> diff --git a/patches/canfestival-3+hg20180126.794/0004-let-canfestival.h-include-config.h.patch b/patches/canfestival-3+hg20180126.794/0004-let-canfestival.h-include-config.h.patch
> new file mode 100644
> index 000000000000..c6b005703e03
> --- /dev/null
> +++ b/patches/canfestival-3+hg20180126.794/0004-let-canfestival.h-include-config.h.patch
> @@ -0,0 +1,39 @@
> +From: =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= <u.kleine-koenig@pengutronix.de>
> +Date: Mon, 29 Jan 2018 14:07:18 +0100
> +Subject: [PATCH] let canfestival.h include config.h
> +
> +This is necessary to make the header self-contained. Otherwise it is necessary to do
> +
> + #include <config.h>
> + #include <canfestival.h>
> +
> +in the API user which might pull in a local config.h.
> +---
> + include/sdo.h | 1 +
> + include/unix/canfestival.h | 1 +
> + 2 files changed, 2 insertions(+)
> +
> +diff --git a/include/sdo.h b/include/sdo.h
> +index 28b8c5c414eb..7863bb5c05a0 100644
> +--- a/include/sdo.h
> ++++ b/include/sdo.h
> +@@ -36,6 +36,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
> +
> + struct struct_s_transfer;
> +
> ++#include "config.h"
> + #include "timer.h"
> +
> + /* Block mode : Data consumer receive step
> +diff --git a/include/unix/canfestival.h b/include/unix/canfestival.h
> +index f20e593dcf89..ee2a0bc0c4ae 100755
> +--- a/include/unix/canfestival.h
> ++++ b/include/unix/canfestival.h
> +@@ -5,6 +5,7 @@
> + extern "C" {
> + #endif
> +
> ++#include "config.h"
> + #include "timerscfg.h"
> + #include "can_driver.h"
> + #include "data.h"
> diff --git a/patches/canfestival-3+hg20180126.794/0005-Use-include-.-instead-of-include-.-for-own-files.patch b/patches/canfestival-3+hg20180126.794/0005-Use-include-.-instead-of-include-.-for-own-files.patch
> new file mode 100644
> index 000000000000..8feaa48a8416
> --- /dev/null
> +++ b/patches/canfestival-3+hg20180126.794/0005-Use-include-.-instead-of-include-.-for-own-files.patch
> @@ -0,0 +1,118 @@
> +From: =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= <u.kleine-koenig@pengutronix.de>
> +Date: Wed, 29 Apr 2020 22:54:55 +0200
> +Subject: [PATCH] Use #include "..." instead of #include <...> for own files
> +
> +This fixes inclusion if the consumer used
> +
> + #include <canfestival/canfestival.h>
> +
> +(and not -I/usr/include/canfestival) as with
> +
> + #include <...>
> +
> +the local files are not found in this case.
> +---
> + include/emcy.h | 2 +-
> + include/lifegrd.h | 2 +-
> + include/nmtSlave.h | 2 +-
> + include/objacces.h | 2 +-
> + include/pdo.h | 4 ++--
> + include/states.h | 2 +-
> + include/timer.h | 4 ++--
> + 7 files changed, 9 insertions(+), 9 deletions(-)
> +
> +diff --git a/include/emcy.h b/include/emcy.h
> +index d3a19eb6d335..ad7ce933eebd 100644
> +--- a/include/emcy.h
> ++++ b/include/emcy.h
> +@@ -39,7 +39,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
> + #define __emcy_h__
> +
> +
> +-#include <applicfg.h>
> ++#include "applicfg.h"
> +
> + /* The error states
> + * ----------------- */
> +diff --git a/include/lifegrd.h b/include/lifegrd.h
> +index a0600a717038..222a3dd18f73 100644
> +--- a/include/lifegrd.h
> ++++ b/include/lifegrd.h
> +@@ -53,7 +53,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
> + #define __lifegrd_h__
> +
> +
> +-#include <applicfg.h>
> ++#include "applicfg.h"
> +
> + typedef void (*heartbeatError_t)(CO_Data*, UNS8);
> + void _heartbeatError(CO_Data* d, UNS8 heartbeatID);
> +diff --git a/include/nmtSlave.h b/include/nmtSlave.h
> +index 0a57ae878364..ffb720194e15 100755
> +--- a/include/nmtSlave.h
> ++++ b/include/nmtSlave.h
> +@@ -28,7 +28,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
> + #ifndef __nmtSlave_h__
> + #define __nmtSlave_h__
> +
> +-#include <applicfg.h>
> ++#include "applicfg.h"
> + #include "data.h"
> +
> + /**
> +diff --git a/include/objacces.h b/include/objacces.h
> +index 26a96542a4ca..05dd46d313d7 100755
> +--- a/include/objacces.h
> ++++ b/include/objacces.h
> +@@ -39,7 +39,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
> + #ifndef __objacces_h__
> + #define __objacces_h__
> +
> +-#include <applicfg.h>
> ++#include "applicfg.h"
> +
> +
> + #ifdef __cplusplus
> +diff --git a/include/pdo.h b/include/pdo.h
> +index d276d51734fc..713167f50071 100755
> +--- a/include/pdo.h
> ++++ b/include/pdo.h
> +@@ -29,8 +29,8 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
> + #ifndef __pdo_h__
> + #define __pdo_h__
> +
> +-#include <applicfg.h>
> +-#include <def.h>
> ++#include "applicfg.h"
> ++#include "def.h"
> +
> + #include "can.h"
> +
> +diff --git a/include/states.h b/include/states.h
> +index 6615a3debe02..804267113bd6 100644
> +--- a/include/states.h
> ++++ b/include/states.h
> +@@ -27,7 +27,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
> + #ifndef __states_h__
> + #define __states_h__
> +
> +-#include <applicfg.h>
> ++#include "applicfg.h"
> +
> + /* The nodes states
> + * -----------------
> +diff --git a/include/timer.h b/include/timer.h
> +index bbf4f98e4f5e..836563021093 100755
> +--- a/include/timer.h
> ++++ b/include/timer.h
> +@@ -23,8 +23,8 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
> + #ifndef __timer_h__
> + #define __timer_h__
> +
> +-#include <timerscfg.h>
> +-#include <applicfg.h>
> ++#include "timerscfg.h"
> ++#include "applicfg.h"
> +
> + #define TIMER_HANDLE INTEGER16
> +
> diff --git a/patches/canfestival-3+hg20180126.794/series b/patches/canfestival-3+hg20180126.794/series
> index 5bad73b7227b..73f9b660f25f 100644
> --- a/patches/canfestival-3+hg20180126.794/series
> +++ b/patches/canfestival-3+hg20180126.794/series
> @@ -3,4 +3,6 @@
> 0001-fix-for-ldconfig-crash-on-make-install.patch
> 0002-fix-for-CAN-ID-byteorder.patch
> 0003-Makefile.in-fix-suffix-rules.patch
> -# dd854f5028c1d8578c6dffd44f0d1f06 - git-ptx-patches magic
> +0004-let-canfestival.h-include-config.h.patch
> +0005-Use-include-.-instead-of-include-.-for-own-files.patch
> +# 3c7ac338090e2d1acca872cb33f8371f - git-ptx-patches magic
> --
> 2.29.2
>
>
> _______________________________________________
> ptxdist mailing list
> ptxdist@pengutronix.de
> To unsubscribe, send a mail with subject "unsubscribe" to ptxdist-request@pengutronix.de
--
Pengutronix e.K. | |
Steuerwalder Str. 21 | http://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de
To unsubscribe, send a mail with subject "unsubscribe" to ptxdist-request@pengutronix.de
^ permalink raw reply [flat|nested] 5+ messages in thread
* [ptxdist] [PATCH] canfestival: Two new patches that make canfestival headers more robust
@ 2021-02-23 20:45 Uwe Kleine-König
2021-02-24 14:16 ` Michael Olbrich
0 siblings, 1 reply; 5+ messages in thread
From: Uwe Kleine-König @ 2021-02-23 20:45 UTC (permalink / raw)
To: ptxdist
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
Hello,
I already sent this patch approx. a year ago, for reasons I didn't try
to understand the added patches failed to apply for Michael Olbrich.
Since then they were used unmodified in a BSP without issues, so I'm
resending for another try.
Best regards
Uwe
...4-let-canfestival.h-include-config.h.patch | 39 ++++++
....-instead-of-include-.-for-own-files.patch | 118 ++++++++++++++++++
patches/canfestival-3+hg20180126.794/series | 4 +-
3 files changed, 160 insertions(+), 1 deletion(-)
create mode 100644 patches/canfestival-3+hg20180126.794/0004-let-canfestival.h-include-config.h.patch
create mode 100644 patches/canfestival-3+hg20180126.794/0005-Use-include-.-instead-of-include-.-for-own-files.patch
diff --git a/patches/canfestival-3+hg20180126.794/0004-let-canfestival.h-include-config.h.patch b/patches/canfestival-3+hg20180126.794/0004-let-canfestival.h-include-config.h.patch
new file mode 100644
index 000000000000..c6b005703e03
--- /dev/null
+++ b/patches/canfestival-3+hg20180126.794/0004-let-canfestival.h-include-config.h.patch
@@ -0,0 +1,39 @@
+From: =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= <u.kleine-koenig@pengutronix.de>
+Date: Mon, 29 Jan 2018 14:07:18 +0100
+Subject: [PATCH] let canfestival.h include config.h
+
+This is necessary to make the header self-contained. Otherwise it is necessary to do
+
+ #include <config.h>
+ #include <canfestival.h>
+
+in the API user which might pull in a local config.h.
+---
+ include/sdo.h | 1 +
+ include/unix/canfestival.h | 1 +
+ 2 files changed, 2 insertions(+)
+
+diff --git a/include/sdo.h b/include/sdo.h
+index 28b8c5c414eb..7863bb5c05a0 100644
+--- a/include/sdo.h
++++ b/include/sdo.h
+@@ -36,6 +36,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+ struct struct_s_transfer;
+
++#include "config.h"
+ #include "timer.h"
+
+ /* Block mode : Data consumer receive step
+diff --git a/include/unix/canfestival.h b/include/unix/canfestival.h
+index f20e593dcf89..ee2a0bc0c4ae 100755
+--- a/include/unix/canfestival.h
++++ b/include/unix/canfestival.h
+@@ -5,6 +5,7 @@
+ extern "C" {
+ #endif
+
++#include "config.h"
+ #include "timerscfg.h"
+ #include "can_driver.h"
+ #include "data.h"
diff --git a/patches/canfestival-3+hg20180126.794/0005-Use-include-.-instead-of-include-.-for-own-files.patch b/patches/canfestival-3+hg20180126.794/0005-Use-include-.-instead-of-include-.-for-own-files.patch
new file mode 100644
index 000000000000..8feaa48a8416
--- /dev/null
+++ b/patches/canfestival-3+hg20180126.794/0005-Use-include-.-instead-of-include-.-for-own-files.patch
@@ -0,0 +1,118 @@
+From: =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= <u.kleine-koenig@pengutronix.de>
+Date: Wed, 29 Apr 2020 22:54:55 +0200
+Subject: [PATCH] Use #include "..." instead of #include <...> for own files
+
+This fixes inclusion if the consumer used
+
+ #include <canfestival/canfestival.h>
+
+(and not -I/usr/include/canfestival) as with
+
+ #include <...>
+
+the local files are not found in this case.
+---
+ include/emcy.h | 2 +-
+ include/lifegrd.h | 2 +-
+ include/nmtSlave.h | 2 +-
+ include/objacces.h | 2 +-
+ include/pdo.h | 4 ++--
+ include/states.h | 2 +-
+ include/timer.h | 4 ++--
+ 7 files changed, 9 insertions(+), 9 deletions(-)
+
+diff --git a/include/emcy.h b/include/emcy.h
+index d3a19eb6d335..ad7ce933eebd 100644
+--- a/include/emcy.h
++++ b/include/emcy.h
+@@ -39,7 +39,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ #define __emcy_h__
+
+
+-#include <applicfg.h>
++#include "applicfg.h"
+
+ /* The error states
+ * ----------------- */
+diff --git a/include/lifegrd.h b/include/lifegrd.h
+index a0600a717038..222a3dd18f73 100644
+--- a/include/lifegrd.h
++++ b/include/lifegrd.h
+@@ -53,7 +53,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ #define __lifegrd_h__
+
+
+-#include <applicfg.h>
++#include "applicfg.h"
+
+ typedef void (*heartbeatError_t)(CO_Data*, UNS8);
+ void _heartbeatError(CO_Data* d, UNS8 heartbeatID);
+diff --git a/include/nmtSlave.h b/include/nmtSlave.h
+index 0a57ae878364..ffb720194e15 100755
+--- a/include/nmtSlave.h
++++ b/include/nmtSlave.h
+@@ -28,7 +28,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ #ifndef __nmtSlave_h__
+ #define __nmtSlave_h__
+
+-#include <applicfg.h>
++#include "applicfg.h"
+ #include "data.h"
+
+ /**
+diff --git a/include/objacces.h b/include/objacces.h
+index 26a96542a4ca..05dd46d313d7 100755
+--- a/include/objacces.h
++++ b/include/objacces.h
+@@ -39,7 +39,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ #ifndef __objacces_h__
+ #define __objacces_h__
+
+-#include <applicfg.h>
++#include "applicfg.h"
+
+
+ #ifdef __cplusplus
+diff --git a/include/pdo.h b/include/pdo.h
+index d276d51734fc..713167f50071 100755
+--- a/include/pdo.h
++++ b/include/pdo.h
+@@ -29,8 +29,8 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ #ifndef __pdo_h__
+ #define __pdo_h__
+
+-#include <applicfg.h>
+-#include <def.h>
++#include "applicfg.h"
++#include "def.h"
+
+ #include "can.h"
+
+diff --git a/include/states.h b/include/states.h
+index 6615a3debe02..804267113bd6 100644
+--- a/include/states.h
++++ b/include/states.h
+@@ -27,7 +27,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ #ifndef __states_h__
+ #define __states_h__
+
+-#include <applicfg.h>
++#include "applicfg.h"
+
+ /* The nodes states
+ * -----------------
+diff --git a/include/timer.h b/include/timer.h
+index bbf4f98e4f5e..836563021093 100755
+--- a/include/timer.h
++++ b/include/timer.h
+@@ -23,8 +23,8 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ #ifndef __timer_h__
+ #define __timer_h__
+
+-#include <timerscfg.h>
+-#include <applicfg.h>
++#include "timerscfg.h"
++#include "applicfg.h"
+
+ #define TIMER_HANDLE INTEGER16
+
diff --git a/patches/canfestival-3+hg20180126.794/series b/patches/canfestival-3+hg20180126.794/series
index 5bad73b7227b..73f9b660f25f 100644
--- a/patches/canfestival-3+hg20180126.794/series
+++ b/patches/canfestival-3+hg20180126.794/series
@@ -3,4 +3,6 @@
0001-fix-for-ldconfig-crash-on-make-install.patch
0002-fix-for-CAN-ID-byteorder.patch
0003-Makefile.in-fix-suffix-rules.patch
-# dd854f5028c1d8578c6dffd44f0d1f06 - git-ptx-patches magic
+0004-let-canfestival.h-include-config.h.patch
+0005-Use-include-.-instead-of-include-.-for-own-files.patch
+# 3c7ac338090e2d1acca872cb33f8371f - git-ptx-patches magic
--
2.29.2
_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de
To unsubscribe, send a mail with subject "unsubscribe" to ptxdist-request@pengutronix.de
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2021-02-24 14:16 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-29 20:59 [ptxdist] [PATCH] canfestival: Two new patches that make canfestival headers more robust Uwe Kleine-König
2020-05-07 8:14 ` Michael Olbrich
2020-05-08 8:53 ` Michael Olbrich
2021-02-23 20:45 Uwe Kleine-König
2021-02-24 14:16 ` Michael Olbrich
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox