lwip master, opt.h uses defines from ppp_opts.h

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

lwip master, opt.h uses defines from ppp_opts.h

Jacob Kroon
Hi,

In opt.h, the defined value for LWIP_NUM_SYS_TIMEOUT_INTERNAL uses
PPP_NUM_TIMEOUTS, which is defined in ppp_opts.h.
I have source code that (implicitly) includes opt.h, but somehow
ppp_opts.h never gets included before, which leads to compiler errors.

What is the intended solution, should users make sure to include
ppp_opts.h before opt.h, or should this be fixed in opt.h itself ?

Regards
Jacob

_______________________________________________
lwip-devel mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/lwip-devel
Reply | Threaded
Open this post in threaded view
|

Re: lwip master, opt.h uses defines from ppp_opts.h

Dirk Ziegelmeier-2
you can #include ppp_opts.h in your lwipopts.h file to fix this.

But I think this should be fixed in opt.h by #including ppp_opts.h

Dirk


On Mon, Aug 20, 2018 at 3:09 PM Jacob Kroon <[hidden email]> wrote:
Hi,

In opt.h, the defined value for LWIP_NUM_SYS_TIMEOUT_INTERNAL uses
PPP_NUM_TIMEOUTS, which is defined in ppp_opts.h.
I have source code that (implicitly) includes opt.h, but somehow
ppp_opts.h never gets included before, which leads to compiler errors.

What is the intended solution, should users make sure to include
ppp_opts.h before opt.h, or should this be fixed in opt.h itself ?

Regards
Jacob

_______________________________________________
lwip-devel mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/lwip-devel

_______________________________________________
lwip-devel mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/lwip-devel
Reply | Threaded
Open this post in threaded view
|

Re: lwip master, opt.h uses defines from ppp_opts.h

goldsimon@gmx.de
On 27.08.2018 10:31, Dirk Ziegelmeier wrote:
you can #include ppp_opts.h in your lwipopts.h file to fix this.

But I think this should be fixed in opt.h by #including ppp_opts.h

Hmm, up to now, we included ppp_opts.h everywhere it was needed. Just indlucing opt.h should not be a problem?

If we included ppp_opts.h from opt.h, we might have to fix the cyclic include...

Simon
_______________________________________________
lwip-devel mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/lwip-devel
Reply | Threaded
Open this post in threaded view
|

Re: lwip master, opt.h uses defines from ppp_opts.h

Dirk Ziegelmeier-2
Jacob, can you explain further? I checked all places in lwIP where LWIP_NUM_SYS_TIMEOUT_INTERNAL or
ME
MP_NUM_SYS_TIMEOUT
are used - all files include ppp_opts.h. Where does your problem originate from? Does your code use one or more of these #defines and you are unable to include ppp_opts.h in these files?


Dirk


On Fri, Aug 31, 2018 at 9:25 PM [hidden email] <[hidden email]> wrote:
On 27.08.2018 10:31, Dirk Ziegelmeier wrote:
you can #include ppp_opts.h in your lwipopts.h file to fix this.

But I think this should be fixed in opt.h by #including ppp_opts.h

Hmm, up to now, we included ppp_opts.h everywhere it was needed. Just indlucing opt.h should not be a problem?

If we included ppp_opts.h from opt.h, we might have to fix the cyclic include...

Simon
_______________________________________________
lwip-devel mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/lwip-devel

_______________________________________________
lwip-devel mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/lwip-devel
Reply | Threaded
Open this post in threaded view
|

Re: lwip master, opt.h uses defines from ppp_opts.h

Jacob Kroon
Hi,

Sorry for the delay, I didn't notice the responses.

On Sat, Sep 1, 2018 at 10:06 AM Dirk Ziegelmeier <[hidden email]> wrote:
>
> Jacob, can you explain further? I checked all places in lwIP where LWIP_NUM_SYS_TIMEOUT_INTERNAL or MEMP_NUM_SYS_TIMEOUT are used - all files include ppp_opts.h. Where does your problem originate from? Does your code use one or more of these #defines and you are unable to include ppp_opts.h in these files?
>
> Dirk
>

It was during compilation of our application code that I saw this
circumstance. Honestly, I can't reproduce the situation currently, but
to me it would make sense if opt.h could be included standalone, and
have all it's defines usable, I don't think that is currently the case
due to the dependency on ppp_opts.h. Nonetheless, we can fix it on our
side by just including ppp_opts.h before opt.h, no problem.

>
> On Fri, Aug 31, 2018 at 9:25 PM [hidden email] <[hidden email]> wrote:
>>
>> On 27.08.2018 10:31, Dirk Ziegelmeier wrote:
>>
>> you can #include ppp_opts.h in your lwipopts.h file to fix this.
>>
>> But I think this should be fixed in opt.h by #including ppp_opts.h
>>
>>
>> Hmm, up to now, we included ppp_opts.h everywhere it was needed. Just indlucing opt.h should not be a problem?
>>
>> If we included ppp_opts.h from opt.h, we might have to fix the cyclic include...
>>

/Jacob

_______________________________________________
lwip-devel mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/lwip-devel