From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Date: Thu, 7 May 2020 10:14:54 +0200 From: Michael Olbrich Message-ID: <20200507081454.GC1153@pengutronix.de> References: <20200429205936.17327-1-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20200429205936.17327-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 Cc: Uwe =?iso-8859-1?Q?Kleine-K=F6nig?= On Wed, Apr 29, 2020 at 10:59:36PM +0200, Uwe Kleine-K=F6nig wrote: > Signed-off-by: Uwe Kleine-K=F6nig 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-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.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