[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [xmlblaster] compiling c-lib on freebsd



Viner, David wrote:
this patch allows c-lib (with SOCKET enabled) to compile on FreeBSD using
gcc-2.95.3.  the only remaining warnings are:

       [cc]
/home/dviner/mom/xb-svn/xmlBlaster/build.tmp/src/c/util/helper.c:575:
warning: ANSI does not permit the keyword `
inline'
       [cc]
/home/dviner/mom/xb-svn/xmlBlaster/build.tmp/src/c/util/helper.c: In
function `int64ToStr':
       [cc]
/home/dviner/mom/xb-svn/xmlBlaster/build.tmp/src/c/util/helper.c:643:
warning: ANSI C does not support the `ll' l
ength modifier
       [cc]
/home/dviner/mom/xb-svn/xmlBlaster/build.tmp/src/c/util/helper.c: In
function `strToInt64':
       [cc]
/home/dviner/mom/xb-svn/xmlBlaster/build.tmp/src/c/util/helper.c:660:
warning: ANSI C does not support the `ll' l
ength modifier
       [cc]
/home/dviner/mom/xb-svn/xmlBlaster/build.tmp/src/c/util/msgUtil.c:196:
warning: ANSI does not permit the keyword
`inline'

I'm not sure how to remove these warnings, but turning off -pedantic.

The src/c/socket/xmlBlasterSocket.h file had a ton of windows-style newlines
which caused lots of warnings to be issued on my machine.  so, I ran
dos2unix on it, which is why it appears that there are a lot of changes to
it.  in fact, the only significant addition is:
	#  include <sys/types.h>
before the inclusion of <sys/socket.h>.  This is required on FreeBSD, and
likely won't hurt any other Unix platforms.

Thanks
dave

Dave,

thank you for this patch, it is now commited to subversion and
available online.
Your patch is handled under LGPL (or any coming more free license like Apache or BSD)
it this is OK for you.

The inline warning:
-------------------
 Do you now how to ask the compiler if it wants C99 or an older variant?
 If such a define is available we could set it in basicDefs.h to something like:

  #  if __standard_C__ >= C99    /* How to check this ??? */
  #    define _INLINE_FUNC inline
  #  else
  #    define _INLINE_FUNC
  #  endif

Using of 64 bit long long:
--------------------------

We need a 64 bit long, so if a compiler does not support it
there is currently no workaround implemented.


Anyhow, you should tell your gcc to compile as C99 and the warnings should disappear even with -pedantic,

regards,

Marcel


-- http://www.xmlBlaster.org