Re: HEADSUP: zlib updated [svn commit: r205471 - in head: . lib/libz lib/libz/contrib lib/libz/doc sys/sys]

From: Garrett Cooper <yanefbsd_at_gmail.com>
Date: Fri, 2 Apr 2010 00:20:12 -0700
On Thu, Apr 1, 2010 at 9:30 PM, Xin LI <delphij_at_gmail.com> wrote:
> Hi, Tom,
>
> On Thu, Apr 1, 2010 at 12:59 PM, Tom Uffner <tom_at_uffner.com> wrote:
> [...]
>> i realize this. i was just adding to the list of ports that no longer
>> build after this change. ghostscript is kind of important for print
>> support.
>>
>> i doubt this is "right" either, but it is a quick & dirty way to
>> make mplayer compile again:
>>
>> --- configure.orig      2010-04-01 15:49:37.000000000 -0400
>> +++ configure   2010-04-01 15:50:50.000000000 -0400
>> _at__at_ -5337,7 +5337,7 _at__at_
>>  #include <dvdread/nav_read.h>
>>  int main(void) { return 0; }
>>  EOF
>> -    cc_check -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
>> -D_LARGEFILE64_SOURCE \
>> +    cc_check -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 \
>>       -ldvdread $_ld_dl && _dvdread=yes && _res_comment="external"
>>   fi
>>  fi
>> _at__at_ -7412,8 +7412,6 _at__at_
>>  if test "$_largefiles" = yes || freebsd ; then
>>   CFLAGS="$CFLAGS -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
>>   if test "$_dvdread" = yes || test "$_libdvdcss_internal" = yes ; then
>> -    # dvdread support requires this (for off64_t)
>> -    CFLAGS="$CFLAGS -D_LARGEFILE64_SOURCE"
>>     cygwin && CFLAGS="$CFLAGS -DSYS_CYGWIN"
>>   fi
>>  fi
>
> Specifying -DFOO basically means in C code one have:
>
> %%%
> #define FOO 1
> %%%

Actually, `CFLAGS += -DFOO=1' is different from `CFLAGS += -DFOO' (I
think Xin Li meant to state the former format).

$ for i in -DBAR -DFOO -DFOO=1 -DFOO=2; do echo "$i"; cc -c $i
test_defined.c; done
-DBAR
-DFOO
test_defined.c:2:2: warning: #warning FOO is defined
test_defined.c:6:2: warning: #warning FOO is 1
test_defined.c:10:2: warning: #warning FOO is non-zero
-DFOO=1
test_defined.c:2:2: warning: #warning FOO is defined
test_defined.c:6:2: warning: #warning FOO is 1
test_defined.c:10:2: warning: #warning FOO is non-zero
-DFOO=2
test_defined.c:2:2: warning: #warning FOO is defined
test_defined.c:10:2: warning: #warning FOO is non-zero
$ cat test_defined.c
#ifdef FOO
#warning FOO is defined
#endif

#if FOO == 1
#warning FOO is 1
#endif

#if FOO
#warning FOO is non-zero
#endif

[...]

Thanks,
-Garrett
Received on Fri Apr 02 2010 - 05:20:14 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:02 UTC