[libmicrohttpd] Clang build fails

2018-02-21 Thread Tim Rühsen
Hi,

currently, clang can't build latest master. It because of a missing
prototype for MHD_init() in src/lib/init.c.

Clang errors at that point while gcc just emits a warning.

Anyways, this breaks building the dependency chain for Wget2 fuzzing :-(


Do you make a CI build before pushing to master ? If you want me to help
to setup a CI on Gitlab, let me know.


init.c:56:5: warning: implicit declaration of function 'MHD_init' is
invalid in C99 [-Wimplicit-function-declaration]
MHD_init ();
^
init.c:98:1: error: conflicting types for 'MHD_init'
MHD_init (void)
^
init.c:56:5: note: previous implicit declaration is here
MHD_init ();
^
1 warning and 1 error generated.


With Best Regards, Tim




signature.asc
Description: OpenPGP digital signature


Re: [libmicrohttpd] Clang build fails

2018-02-21 Thread Christian Grothoff
Hi,

Build issue should be fixed in Git now.

IIRC, our CI (Buildbot) is not (yet) setup to build with clang, but also
it doesn't send out proper notifications on failures in the first place,
so it is right now of limited use.

Help with setting up better CIs would always be welcome, albeit I
personally prefer using our "own" infrastructure (we have machines)
instead of depending on some corporate hosting.  Generally, I would like
to end up with a setup where the entire CI configuration is also in a
Git repo and can be easily collaboratively improved. So if you have time
and energy to make that happen, great ;-)

Happy hacking!

Christian



On 02/21/2018 10:17 AM, Tim Rühsen wrote:
> Hi,
> 
> currently, clang can't build latest master. It because of a missing
> prototype for MHD_init() in src/lib/init.c.
> 
> Clang errors at that point while gcc just emits a warning.
> 
> Anyways, this breaks building the dependency chain for Wget2 fuzzing :-(
> 
> 
> Do you make a CI build before pushing to master ? If you want me to help
> to setup a CI on Gitlab, let me know.
> 
> 
> init.c:56:5: warning: implicit declaration of function 'MHD_init' is
> invalid in C99 [-Wimplicit-function-declaration]
> MHD_init ();
> ^
> init.c:98:1: error: conflicting types for 'MHD_init'
> MHD_init (void)
> ^
> init.c:56:5: note: previous implicit declaration is here
> MHD_init ();
> ^
> 1 warning and 1 error generated.
> 
> 
> With Best Regards, Tim
> 
> 



signature.asc
Description: OpenPGP digital signature


Re: [libmicrohttpd] Clang build fails

2018-02-21 Thread Tim Rühsen
On 02/21/2018 10:28 AM, Christian Grothoff wrote:
> Hi,
> 
> Build issue should be fixed in Git now.

Thanks !

> IIRC, our CI (Buildbot) is not (yet) setup to build with clang, but also
> it doesn't send out proper notifications on failures in the first place,
> so it is right now of limited use.
> 
> Help with setting up better CIs would always be welcome, albeit I
> personally prefer using our "own" infrastructure (we have machines)
> instead of depending on some corporate hosting.

Well yes, I don't have the luxury of an own infrastructure...

> Generally, I would like
> to end up with a setup where the entire CI configuration is also in a
> Git repo and can be easily collaboratively improved. So if you have time
> and energy to make that happen, great ;-)

Gitlab allows exactly that,  but you have your own CI already running
and the missing parts are maybe just a piece of configuration.
So it has to be your initiative.

If you like to give Gitlab a chance, let me know and I surely can help.
You can also have your own Gitlab instance without gitlab.com involved.
And BTW, you can use gitlab-ci-multi-runner to use your own machines /
OSes as CI runners. The gitlab.com CI hosting is limited to docker, but
hey - it's free to use. And since the CI setup is developed in a git
repo as well, nothing is lost, even if gitlab.com dies.


With Best Regards, Tim



signature.asc
Description: OpenPGP digital signature


[libmicrohttpd] 回复:Re: Any MHD_ContentReaderCallback Example Code

2018-02-21 Thread lingweicai
Thanks Christian. Can I create a MHD_response, by the crc callback to print a circleq ( a circle queue,generated with Macro functions /sys/queue.h ), my crc callback is like this : ssize_tcrc (void *cls, uint64_t pos, char *buf, size_t max){    struct circleq_user  * cq_user_ptr = cls; // if last entry, end the crc if ( cq_user_ptr->entries.cqe_next == (void *) &head )     return MHD_CONTENT_READER_END_OF_STREAM;// pointer of next entry to assigned to cls cls  = cq_user_ptr->entries.cqe_next ;// generate buff content    return snprintf (buf, 256,   "   cq_user_ptr->user_mem_list_ptr->u_base.u_name ,   cq_user_ptr->user_mem_list_ptr->u_base.u_name     );}  when my circle-head pointer as the parameter of cls for crc, the above code always print the first entry of my circle queue. Can I assign the next pointer of "cls  = cq_user_ptr->entries.cqe_next ; " to re-callback the crc ? it looks this does not work. how can I transfer the "next pointer" of my list as the parameter to the next call crc ?Thanks,Forrest Ling wei cai. - 原始邮件 - 发件人:Christian Grothoff发送时间:2018-02-05 21:58:17收件人:lingweicai;libmicrohttpd主 题:Re: Any MHD_ContentReaderCallback Example CodeOn 02/04/2018 03:19 AM, lingweicai wrote:> Dear all:> 
> I want to create responses with strings variables, for example , html> start tag, html title, css, js, head1, content, html end tag , etc.> 
> Can I use this callback function instead of> MHD_create_response_from_buffer?In principle you can use MHD_create_response_from_callback() alwaysinstead of _from_buffer, as _from_callback is more general. Whether itmakes sense in your case I cannot judge.> I have not found any example codes on the callback.Look here: src/examples/fileserver_example_dirs.c 



Re: [libmicrohttpd] Clang build fails

2018-02-21 Thread Christian Grothoff
On 02/21/2018 12:15 PM, Tim Rühsen wrote:
>> Generally, I would like
>> to end up with a setup where the entire CI configuration is also in a
>> Git repo and can be easily collaboratively improved. So if you have time
>> and energy to make that happen, great ;-)
> 
> Gitlab allows exactly that,  but you have your own CI already running
> and the missing parts are maybe just a piece of configuration.
> So it has to be your initiative.
> 
> If you like to give Gitlab a chance, let me know and I surely can help.
> You can also have your own Gitlab instance without gitlab.com involved.
> And BTW, you can use gitlab-ci-multi-runner to use your own machines /
> OSes as CI runners. The gitlab.com CI hosting is limited to docker, but
> hey - it's free to use. And since the CI setup is developed in a git
> repo as well, nothing is lost, even if gitlab.com dies.

Well, as long as we can easily export the result from gitlab.com to
eventually move it to independent infrastructure, there's nothing wrong
with starting a CI system there first. So please do give it a shot!

Would it be useful to create a new mailinglist for CI notifications for
this, or should we just use this list?




signature.asc
Description: OpenPGP digital signature


Re: [libmicrohttpd] Clang build fails

2018-02-21 Thread Tim Ruehsen
Am Mittwoch, den 21.02.2018, 20:38 +0100 schrieb Christian Grothoff:
> On 02/21/2018 12:15 PM, Tim Rühsen wrote:
> > > Generally, I would like
> > > to end up with a setup where the entire CI configuration is also
> > > in a
> > > Git repo and can be easily collaboratively improved. So if you
> > > have time
> > > and energy to make that happen, great ;-)
> > 
> > Gitlab allows exactly that,  but you have your own CI already
> > running
> > and the missing parts are maybe just a piece of configuration.
> > So it has to be your initiative.
> > 
> > If you like to give Gitlab a chance, let me know and I surely can
> > help.
> > You can also have your own Gitlab instance without gitlab.com
> > involved.
> > And BTW, you can use gitlab-ci-multi-runner to use your own
> > machines /
> > OSes as CI runners. The gitlab.com CI hosting is limited to docker,
> > but
> > hey - it's free to use. And since the CI setup is developed in a
> > git
> > repo as well, nothing is lost, even if gitlab.com dies.
> 
> Well, as long as we can easily export the result from gitlab.com to
> eventually move it to independent infrastructure, there's nothing
> wrong
> with starting a CI system there first. So please do give it a shot!
> 
> Would it be useful to create a new mailinglist for CI notifications
> for
> this, or should we just use this list?

I will create a new group on gitlab.com for libmicrohttpd and give you
and Evgeny (?) full premissions (owner). Then it needs one project for
the ci-runners to build and another one for libmicrohttpd. I can set
all this up tomorrow.
Maybe we talk via phone when set up, makes some things easier to
explain. I will give you my phone number then via PM.

Regards, Tim