[haiku-commits] Re: BRANCH mmadia-github.separate-build-environment - headers/build/posix_target

  • From: "Ingo Weinhold" <ingo_weinhold@xxxxxx>
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Sun, 05 Aug 2012 20:45:11 +0200

On Sun,  5 Aug 2012 19:49:23 +0200 (CEST) 
mmadia-github.separate-build-environment" <community@xxxxxxxxxxxx> wrote:
> diff --git a/headers/build/posix_target/target_limits.h
> b/headers/build/posix_target/target_limits.h
> index 249fb9a..2b8da1f 100644
> --- a/headers/build/posix_target/target_limits.h
> +++ b/headers/build/posix_target/target_limits.h
> @@ -17,8 +17,8 @@
>       Get the values via HaikuHostBuildConfig.h
>  */
>  
> -#define _HAIKU_BUILD_LONGLONG_MIN                    (-9223372036854775807LL 
> - 1)    /* these
> are Be specific */
> -#define _HAIKU_BUILD_LONGLONG_MAX                    (9223372036854775807LL)
> +#define _HAIKU_BUILD_LONGLONG_MIN                    
> _HAIKU_BUILD_FEATURE_LLONG_MIN
> +#define _HAIKU_BUILD_LONGLONG_MAX                    
> _HAIKU_BUILD_FEATURE_LLONG_MAX
>  #define _HAIKU_BUILD_ULONGLONG_MAX                   (0xffffffffffffffffULL)

There is also a ULLONG_MAX in ISO C, so it could be retrieved via 
HaikuHostBuildConfig.h as well.

[...]
> diff --git a/headers/build/posix_target/target_inttypes.h
> b/headers/build/posix_target/target_inttypes.h
> index 2bb86ae..d9621ca 100644
> --- a/headers/build/posix_target/target_inttypes.h
> +++ b/headers/build/posix_target/target_inttypes.h
> @@ -9,8 +9,8 @@
>  #include <target_stdint.h>
>  
>  typedef struct {
> -     intmax_t _HAIKU_BUILD_IDENTIFIER(quot); /* quotient */
> -     intmax_t _HAIKU_BUILD_IDENTIFIER(rem);  /* remainder */
> +     _haiku_build_intmax_t quot;     /* quotient */
> +     _haiku_build_intmax_t rem;      /* remainder */
>  } _HAIKU_BUILD_IDENTIFIER(imaxdiv_t);
>  
>  // NOTE: #8730 does __STDC_FORMAT_MACROS need to be _HAIKU_BUILD_
> prefixed?
> @@ -379,16 +379,23 @@ typedef struct {
>  extern "C" {
>  #endif
>  
> -intmax_t     _HAIKU_BUILD_DECLARE_FUNCTION(intmax_t, imaxabs, (intmax_t num))
> -imaxdiv_t    _HAIKU_BUILD_DECLARE_FUNCTION(imaxdiv_t, imaxdiv, \
> -     (intmax_t numer, intmax_t denom))
> -
> -intmax_t     _HAIKU_BUILD_DECLARE_FUNCTION(intmax_t, strtoimax, \
> -     (const char *string, char **_end, int base))
> -uintmax_t    _HAIKU_BUILD_DECLARE_FUNCTION(uintmax_t, strtoumax, \
> -     (const char *string, char **_end, int base))
> -/* intmax_t  _HAIKU_BUILD_DECLARE_FUNCTION(intmax_t, wcstoimax, (const
> __wchar_t *, __wchar_t **, int)) */
> -/* uintmax_t _HAIKU_BUILD_DECLARE_FUNCTION(uintmax_t, wcstoumax, (const
> __wchar_t *, __wchar_t **, int)) */
> +_haiku_build_intmax_t        
> _HAIKU_BUILD_DECLARE_FUNCTION(_haiku_build_intmax_t,
> \
> +     imaxabs, (_haiku_build_intmax_t num))

Note that the return type is the first parameter of the 
_HAIKU_BUILD_DECLARE_FUNCTION macro. It shouldn't be before the macro as well.

CU, Ingo

Other related posts: