bugVarnamproject - Bugs: bug #41252, [libvarnam] Remove snprintf defines

 
 

bug #41252: [libvarnam] Remove snprintf defines

Submitted by:  Navaneeth <navaneethkn>
Submitted on:  Thu 16 Jan 2014 04:03:09 PM UTC  
 
Category: libvarnamSeverity: 4 - Important
Item Group: BugStatus: None
Privacy: PublicAssigned to: None
Open/Closed: Open

Add a New Comment (Rich MarkupRich Markup):
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Thu 20 Mar 2014 04:43:24 AM UTC, comment #2:

Varnam uses a portable snprintf implementation available at https://gitorious.org/varnamproject/libvarnam/source/455a2a5df151d93ace5f65de655efd6532e3e0a6:deps/snprintf.c.

To maintain compatibility with platforms which has snprintf, the authors of that library decided to use some MACROS which can be used to toggle the portable snprintf implementation. So systems which has support for it can just use the system version and those who don't will get the portable implementation.

Now this requires you define some MACROS while compile programs which uses Varnam. We don't have to expose this because this is libvarnam's implementation detail.

Try running

pkg-config --cflags varnam

Which will give you an output like,

-DHAVE_SNPRINTF -DPREFER_PORTABLE_SNPRINTF -DNEED_ASPRINTF -I/usr/local/include/libvarnam

This bug talks about removing the HAVE_SNPRINTF and other snprintf related defines so that everyone who needs to use varnam need not define all these. You can't simply remove it because they are in use. So need to find out places where this is in use, define these manually in the compilation unit and remove it from pkg-config flags.

Navaneeth <navaneethkn>
Project Administrator
Thu 20 Mar 2014 04:07:50 AM UTC, comment #1:

Where are these macros defined?

Kevin Martin Jose <lonesword>
Thu 16 Jan 2014 04:03:09 PM UTC, original submission:

Currently to compile the code, you need to define SNPRINTF macros. This should be simplified

Navaneeth <navaneethkn>
Project Administrator

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by lonesword (Posted a comment)
  • -unavailable- added by navaneethkn (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    No Changes Have Been Made to This Item

    Back to the top


    Powered by Savane 3.1-cleanup