You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@trafficserver.apache.org by Igor Galić <i....@brainsware.org> on 2013/04/21 10:02:25 UTC

Re: git commit: TS-1820 Eliminate ink_port.h and ink_bool.h as part of the cleanup phase


----- Original Message -----
> Updated Branches:
>   refs/heads/master 351f63fdb -> cd2831bf1
> 
> 
> TS-1820 Eliminate ink_port.h and ink_bool.h as part of the cleanup
> phase
[snip]
> Commit: cd2831bf1eeee456f808deb4e4a3e67399f95eb7
> Parents: 351f63f
[snip]
> http://git-wip-us.apache.org/repos/asf/trafficserver/blob/cd2831bf/lib/ts/Allocator.h
> ----------------------------------------------------------------------
> diff --git a/lib/ts/Allocator.h b/lib/ts/Allocator.h
> index 9335973..ab46b86 100644
> --- a/lib/ts/Allocator.h
> +++ b/lib/ts/Allocator.h
> @@ -42,7 +42,7 @@
>  
>  #include <stdlib.h>
>  #include "ink_queue.h"
> -#include "ink_port.h"
> +#include "ink_defs.h"
>  #include "ink_resource.h"
>  
>  #define RND16(_x)               (((_x)+15)&~15)

Could someone enlighten me as to what this is or what it does?

it seems we only use it in this same file on line 166:

    ink_freelist_init(&this->fl, name, RND16(sizeof(C)), chunk_size, RND16(alignment));


> http://git-wip-us.apache.org/repos/asf/trafficserver/blob/cd2831bf/lib/ts/Compatability.h
> ----------------------------------------------------------------------
> diff --git a/lib/ts/Compatability.h b/lib/ts/Compatability.h
> index c5e9a38..b8df906 100644
> --- a/lib/ts/Compatability.h
> +++ b/lib/ts/Compatability.h
> @@ -30,7 +30,7 @@
>  #include <stdio.h>
>  #include <strings.h>
>  
> -#include "ink_port.h"
> +#include "ink_defs.h"
>  #include "ink_resource.h"
>  
>  // We can't use #define for min and max becuase it will conflict
>  with

... // other declarations of min and max functions.  This conflict
   // occurs with STL

It then goes on to declare min and max, but we also #define MIN and MAX
in  lib/ts/ink_defs.h perhaps we should decide which one we want to use
and stick to it...?



-- i
Igor Galić

Tel: +43 (0) 664 886 22 883
Mail: i.galic@brainsware.org
URL: http://brainsware.org/
GPG: 6880 4155 74BD FD7C B515  2EA5 4B1D 9E08 A097 C9AE