Giter VIP home page Giter VIP logo

Comments (4)

kristapsdz avatar kristapsdz commented on June 8, 2024

That's intentional. I don't put inclusion in header files unless it's in, say, config.h. This is noted in kwebapp-c-header(1).

   Data structures
     The basis of the C API is a series of enumerations, structures, and
     preprocessor macros that describe the data.  To include output files for
     data structures, you'll need:

           #include <sys/queue.h> /* iff you have lists */
           #include <stdint.h>

from openradtool.

mbucc avatar mbucc commented on June 8, 2024

Sorry, I meant to say db.c not db.h.

I was surprised my main routine stopped compiling after adding the list stanza to configure file. The code in my main, paraphrased, goes like this:

        struct act_q   *acts;
        acts = db_act_list_by...
        json_act_array(&req, acts);

I fixed it by adding the import to my main routine, but I thought that include should have been db.c's responsibility. No big deal either way.

from openradtool.

kristapsdz avatar kristapsdz commented on June 8, 2024

The queue macros (sys/queue.h) are always included in the output of kwebapp-c-source (db.c in this case), regardless of whether they're needed. This doesn't affect your sources, however---you must include them prior to the db.h inclusion as mentioned in kwebapp-c-header. That's just how C works: db.h (or whatever you've named it) requires sys/queue.h in every file that includes it. Is that what you mean in this? (I'm not aware of your level of C knowledge---I apologise for sounding pedantic if I'm just misunderstanding you!)

from openradtool.

mbucc avatar mbucc commented on June 8, 2024

Nope, you nailed it. My lack of C knowledge is the issue here.

from openradtool.

Related Issues (8)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.