Samba 3.0.20pre1 Available for Download

Herb Lewis hlewis at panasas.com
Wed Jun 22 21:07:48 GMT 2005


at least on linux those are not equivelent. Try the following program. I
get different lengths printed.

#include  <stdio.h>

#define MSG "Hello world\n"
#define LEN1 sizeof(MSG)
#define LEN2 strlen(MSG)

main ()
{
         printf(MSG);
         printf("len1=%d len2=%d\n",LEN1,LEN2);
}


Richard Bollinger wrote:
> One more clunker...  in client/smbspool.c.  The Sun compiler doesn't like
> using strlen in an array length expression.
> 
> Thanks, Rich B
> 
> --- ../source/client/smbspool.c Mon May  9 12:05:29 2005
> +++ ./client/smbspool.c Fri May 20 08:59:25 2005
> @@ -29,7 +29,7 @@
>  #define TICKET_CC_DIR            "/tmp"
>  #define CC_PREFIX                "krb5cc_" /* prefix of the ticket cache */
>  #define CC_MAX_FILE_LEN          24
> -#define CC_MAX_FILE_PATH_LEN    strlen(TICKET_CC_DIR)+ CC_MAX_FILE_LEN+2
> +#define CC_MAX_FILE_PATH_LEN    sizeof(TICKET_CC_DIR)+ CC_MAX_FILE_LEN+2
>  #define OVERWRITE                1
>  #define KRB5CCNAME              "KRB5CCNAME"


More information about the samba-technical mailing list