Yes, Ben is correct. Some background: the intention is to build a C++ program that includes some OVS header files and links against the OVS library. Including the header dynamic-string.h results in compilation errors. The library is still being built with C using the usual OVS build process, so it is really not necessary to change dynamic-string.c till someone tries to build the entire OVS code-base using C++.
On Wed, Nov 12, 2014 at 9:59 AM, Ben Pfaff <[email protected]> wrote: > On Wed, Nov 12, 2014 at 03:55:00PM -0200, Flavio Leitner wrote: > > On Wed, Nov 12, 2014 at 03:06:08PM +0100, Thomas Graf wrote: > > > From: Amit Bose <[email protected]> > > > > It would be nice to have some description to what this is > > trying to solve. Is there a real problem being fixed here? > > > > > Signed-off-by: Amit Bose <[email protected]> > > > --- > > > AUTHORS | 1 + > > > lib/dynamic-string.h | 4 ++-- > > > 2 files changed, 3 insertions(+), 2 deletions(-) > > > > > > diff --git a/AUTHORS b/AUTHORS > > > index b5ac696..84fca3a 100644 > > > --- a/AUTHORS > > > +++ b/AUTHORS > > > @@ -8,6 +8,7 @@ Alexey I. Froloff [email protected] > > > Alex Wang [email protected] > > > Alfredo Finelli [email protected] > > > Alin Serdean [email protected] > > > +Amit Bose [email protected] > > > Andrew Evans [email protected] > > > Andrew Lambeth [email protected] > > > Andy Hill [email protected] > > > diff --git a/lib/dynamic-string.h b/lib/dynamic-string.h > > > index 2272343..396a24e 100644 > > > --- a/lib/dynamic-string.h > > > +++ b/lib/dynamic-string.h > > > @@ -61,9 +61,9 @@ int ds_get_line(struct ds *, FILE *); > > > int ds_get_preprocessed_line(struct ds *, FILE *, int *line_number); > > > int ds_get_test_line(struct ds *, FILE *); > > > > > > -void ds_put_strftime_msec(struct ds *, const char *template, long > long int when, > > > +void ds_put_strftime_msec(struct ds *, const char *format, long long > int when, > > > bool utc); > > > > What about the function itself in lib/dynamic-string.c: > > > > 187 /* Writes the current time with optional millisecond resolution to > 'string' > > 188 * based on 'template'. > > 189 * The current time is either localtime or UTC based on 'utc'. */ > > 190 void > > 191 ds_put_strftime_msec(struct ds *ds, const char *template, long long > int when, > > 192 bool utc) > > 193 { > > > > > > > -char *xastrftime_msec(const char *template, long long int when, bool > utc); > > > +char *xastrftime_msec(const char *format, long long int when, bool > utc); > > > > 187 /* Writes the current time with optional millisecond resolution to > 'string' > > 188 * based on 'template'. > > 189 * The current time is either localtime or UTC based on 'utc'. */ > > 190 void > > 191 ds_put_strftime_msec(struct ds *ds, const char *template, long long > int when, > > 192 bool utc) > > 193 { > > > > It would require fixing the comments as well. > > I guess that some C++ program is including the header file, but that the > .c file is still compiled as C. > _______________________________________________ dev mailing list [email protected] http://openvswitch.org/mailman/listinfo/dev
