[MacPorts] #68520: zvbi: need to fix endian macros so that old Xcode gcc recognized them

MacPorts noreply at macports.org
Fri Oct 20 20:54:22 UTC 2023


#68520: zvbi: need to fix endian macros so that old Xcode gcc recognized them
-----------------------------------------+--------------------
 Reporter:  barracuda156                 |      Owner:  (none)
     Type:  defect                       |     Status:  new
 Priority:  Normal                       |  Milestone:
Component:  ports                        |    Version:  2.8.1
 Keywords:  snowleopard, leopard, tiger  |       Port:  zvbi
-----------------------------------------+--------------------
 Returning to this issue: apparently Xcode gcc do not recognize these
 macros (which are working for the modern gcc):
 {{{
 /usr/bin/gcc-4.2 -std=gnu99 -DHAVE_CONFIG_H -I. -I..  -I..  -D_REENTRANT
 -D_GNU_SOURCE -I/opt/local/include -I..  -D_REENTRANT -D_GNU_SOURCE -pipe
 -Os -arch ppc -MT osc.o -MD -MP -MF .deps/osc.Tpo -c -o osc.o osc.c
 caption.c: In function ‘draw_transparent_spaces’:
 caption.c:217: error: ‘__BYTE_ORDER__’ undeclared (first use in this
 function)
 caption.c:217: error: (Each undeclared identifier is reported only once
 caption.c:217: error: for each function it appears in.)
 caption.c:217: error: ‘__ORDER_BIG_ENDIAN__’ undeclared (first use in this
 function)
 make[2]: *** [caption.o] Error 1
 make[2]: *** Waiting for unfinished jobs....
 mv -f .deps/unicode.Tpo .deps/unicode.Po
 mv -f .deps/osc.Tpo .deps/osc.Po
 make[2]: Leaving directory
 `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_multimedia_zvbi/zvbi/work/zvbi-0.2.35/test'
 make[1]: *** [all-recursive] Error 1
 make[1]: Leaving directory
 `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_multimedia_zvbi/zvbi/work/zvbi-0.2.35'
 make: *** [all] Error 2
 }}}

 There is no failure with `gcc13`, but there are a few warnings to take
 care of, perhaps:
 {{{
 libtool: compile:  /opt/local/bin/gcc-mp-13 -DHAVE_CONFIG_H -I. -I.. -I..
 -D_REENTRANT -D_GNU_SOURCE -I/opt/local/include -pipe -Os -arch ppc -MT
 io-sim.lo -MD -MP -MF .deps/io-sim.Tpo -c io-sim.c  -fno-common -DPIC -o
 .libs/io-sim.o
 io-sim.c: In function 'vbi_raw_add_noise':
 io-sim.c:501:9: warning: implicit declaration of function 'sincos'
 [-Wimplicit-function-declaration]
   501 |         sincos (w0, &sn, &cs);
       |         ^~~~~~
 io-sim.c:56:1: note: include '<math.h>' or provide a declaration of
 'sincos'
    55 | #include "io-sim.h"
   +++ |+#include <math.h>
    56 |
 io-sim.c:501:9: warning: incompatible implicit declaration of built-in
 function 'sincos' [-Wbuiltin-declaration-mismatch]
   501 |         sincos (w0, &sn, &cs);
       |         ^~~~~~
 io-sim.c:501:9: note: include '<math.h>' or provide a declaration of
 'sincos'
 . . .
 xds_demux.c: In function 'vbi_xds_demux_reset':
 xds_demux.c:829:43: warning: iteration 24 invokes undefined behavior
 [-Waggressive-loop-optimizations]
   829 |                 xd->subpacket[0][i].count = 0;
       |                 ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
 xds_demux.c:828:23: note: within this loop
   828 |         for (i = 0; i < n; ++i)
       |                     ~~^~~
 . . .
 ntsc-cc.c: In function 'xds_filter_option':
 ntsc-cc.c:1164:45: warning: iteration 25 invokes undefined behavior
 [-Waggressive-loop-optimizations]
  1164 |                         info[0][0][i].print = TRUE;
 ntsc-cc.c:1162:31: note: within this loop
  1162 |                 for (i = 0; i < (N_ELEMENTS (info[0])
       |                             ~~^~~~~~~~~~~~~~~~~~~~~~~
  1163 |                                  * N_ELEMENTS (info[0][0])); ++i)
 {
       |                                  ~~~~~~~~~~~~~~~~~~~~~~~~~~
 }}}
 }}}

-- 
Ticket URL: <https://trac.macports.org/ticket/68520>
MacPorts <https://www.macports.org/>
Ports system for macOS


More information about the macports-tickets mailing list