From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from ptx.hi.pengutronix.de ([2001:67c:670:100:1d::c0]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lEuy9-000080-Me for ptxdist@pengutronix.de; Wed, 24 Feb 2021 15:16:49 +0100 Received: from mol by ptx.hi.pengutronix.de with local (Exim 4.92) (envelope-from ) id 1lEuy9-0001Wy-Dq for ptxdist@pengutronix.de; Wed, 24 Feb 2021 15:16:49 +0100 Date: Wed, 24 Feb 2021 15:16:49 +0100 From: Michael Olbrich Message-ID: <20210224141649.GE17609@pengutronix.de> References: <20210223204543.31109-1-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20210223204543.31109-1-u.kleine-koenig@pengutronix.de> Subject: Re: [ptxdist] [PATCH] canfestival: Two new patches that make canfestival headers more robust List-Id: PTXdist Development Mailing List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: ptxdist@pengutronix.de Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Errors-To: ptxdist-bounces@pengutronix.de Sender: "ptxdist" To: ptxdist@pengutronix.de On Tue, Feb 23, 2021 at 09:45:43PM +0100, Uwe Kleine-K=F6nig wrote: > Signed-off-by: Uwe Kleine-K=F6nig > --- > 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-canfest= ival.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-canf= estival.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: =3D?UTF-8?q?Uwe=3D20Kleine-K=3DC3=3DB6nig?=3D > +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 nec= essary to do > + > + #include > + #include > + > +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-.-inst= ead-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: =3D?UTF-8?q?Uwe=3D20Kleine-K=3DC3=3DB6nig?=3D > +Date: Wed, 29 Apr 2020 22:54:55 +0200 > +Subject: [PATCH] Use #include "..." instead of #include <...> for own fi= les > + > +This fixes inclusion if the consumer used > + > + #include > + > +(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 > ++#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 > ++#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 > ++#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 > ++#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 > +-#include > ++#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 > ++#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 > +-#include > ++#include "timerscfg.h" > ++#include "applicfg.h" > + = > + #define TIMER_HANDLE INTEGER16 > + = > diff --git a/patches/canfestival-3+hg20180126.794/series b/patches/canfes= tival-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@p= engutronix.de