[haiku-gsoc] Re: Licensing questions

  • From: Hamish Morrison <hamishm53@xxxxxxxxx>
  • To: haiku-gsoc@xxxxxxxxxxxxx
  • Date: Sun, 11 Jun 2017 15:08:18 +0100

On 11/06/2017 13:29, Vivek Roy wrote:

Up next, couple of warnings.

warning: implicit declaration of function 'vsnprintf'
[-Wimplicit-function-declaration]
warning: implicit declaration of function 'strtouq'
[-Wimplicit-function-declaration]
warning: implicit declaration of function 'strtoq'
[-Wimplicit-function-declaration]
warning: implicit declaration of function 'strtoul'
[-Wimplicit-function-declaration]
warning: implicit declaration of function 'strtol'
[-Wimplicit-function-declaration]
warning: implicit declaration of function 'ppsratecheck'
[-Wimplicit-function-declaration]

For vsnprintf we can import stdio.h
For strtouq, strtoq, strtoul and strtol we have files in posix/stdlib
Finally for ppsratecheck we need time.h from freebsd

Which of the above warnings can/should we ignore?

'Implicit declaration of function' means the declaration of the function is missing. You really can't ignore these warnings; you have to find the right header to include (if we implement it already in Haiku), or implement it yourself.

A bunch of those are C standard library functions (vsnprintf, strtol, etc) that I imagine Haiku might already implement in the kernel. ppsratecheck I've never heard of - you might have to implement this one yourself or figure out what it's being used for and see if we have an equivalent.

The atomic function name conflicts are a bit problematic - yes you might just have to go and prefix them with linux_ or similar. The other option is to declare the functions as linux_atomic_etc and then #define atomic_etc linux_atomic_etc, and avoid changing DRM code. But this may give you more trouble than it's worth because it might mess up calls to the original atomic_etc functions in Haiku headers, depending on what gets included after what. Just experiment and see what happens.

Other related posts: