Changeset 2955

Show
Ignore:
Timestamp:
2007-06-16 02:24:45 (1 year ago)
Author:
conrad
Message:

clean up handling of CFLAGS in Makefile.am throughout, set -std=c99 and get
rid of most compile errors (XXX: except delcarations for random, fileno, strsep)

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • liboggz/trunk/configure.ac

    r2608 r2955  
    287287dnl changequote(,)dnl 
    288288if test "x$ac_cv_prog_gcc" = xyes ; then 
    289   CFLAGS="$CFLAGS -Wall -g
     289  CFLAGS="$CFLAGS -Wall -g -std=c99 -Wdeclaration-after-statement
    290290fi 
    291291dnl changequote([,])dnl 
    292292 
    293293case "$target_os" in 
    294   darwin* | rhapsody*) 
    295     dnl Disable -Wall and -pedantic for Apple Darwin/Rhapsody. 
    296     dnl System headers on these systems are broken. 
    297     temp_CFLAGS=`echo $CFLAGS | sed "s/-Wall -pedantic//"` 
    298     CFLAGS=$temp_CFLAGS 
    299     ;; 
    300294  linux* | solaris*) 
    301295    SHLIB_VERSION_ARG="-Wl,--version-script=Version_script" 
  • liboggz/trunk/src/examples/Makefile.am

    r2563 r2955  
    11## Process this file with automake to produce Makefile.in 
    2  
    3 AM_CFLAGS = -Wall -pedantic -g 
    42 
    53INCLUDES = -I$(top_srcdir)/include @OGG_CFLAGS@ 
  • liboggz/trunk/src/liboggz/Makefile.am

    r2608 r2955  
    11## Process this file with automake to produce Makefile.in 
    2  
    3 AM_CFLAGS = -Wall -pedantic 
    42 
    53INCLUDES = $(INCLTDL) -I$(top_srcdir)/include @OGG_CFLAGS@ 
  • liboggz/trunk/src/liboggz/oggz_auto.c

    r2942 r2955  
    680680    int mode; 
    681681    int size; 
    682     int prev_bit; 
    683     int next_bit; 
    684682    int result; 
    685683 
     
    877875int 
    878876oggz_auto_get_granulerate (OGGZ * oggz, ogg_packet * op, long serialno,  
    879                 void * user_data) { 
    880   OggzReadPacket read_packet; 
     877                void * user_data) 
     878
    881879  int content = 0; 
    882880 
  • liboggz/trunk/src/liboggz/oggz_comments.c

    r2608 r2955  
    3636#include <stdlib.h> 
    3737#include <string.h> 
     38#include <strings.h> 
    3839 
    3940#include "oggz_private.h" 
  • liboggz/trunk/src/liboggz/oggz_private.h

    r2608 r2955  
    264264int oggz_purge (OGGZ * oggz); 
    265265 
    266 int oggz_auto_get_granulerate (OGGZ * oggz, ogg_packet * op, long serialno,  
    267                 void * user_data); 
     266/* metric_internal */ 
    268267 
    269268int 
     
    277276                                    ogg_int64_t * granulerate_d); 
    278277 
     278int oggz_set_granuleshift (OGGZ * oggz, long serialno, int granuleshift); 
     279 
     280int oggz_get_granuleshift (OGGZ * oggz, long serialno); 
     281 
     282/* oggz_auto */ 
     283  
     284int 
     285oggz_auto_get_granulerate (OGGZ * oggz, ogg_packet * op, long serialno,  
     286                           void * user_data); 
     287 
    279288int 
    280289oggz_auto_read_comments (OGGZ * oggz, oggz_stream_t * stream, long serialno, 
    281290                         ogg_packet * op); 
     291 
     292int oggz_auto_identify (OGGZ *oggz, ogg_page *og, long serialno); 
    282293 
    283294/* comments */ 
  • liboggz/trunk/src/liboggz/oggz_vector.c

    r2563 r2955  
    4141typedef int (*OggzFunc) (void * data); 
    4242typedef int (*OggzFindFunc) (void * data, long serialno); 
    43 typedef int (*OggzCmpFunc) (void * a, void * b, void * user_data); 
     43typedef int (*OggzCmpFunc) (const void * a, const void * b, void * user_data); 
    4444 
    4545typedef struct _OggzVector OggzVector; 
     
    142142  int i; 
    143143 
    144   if (vector->compare == NULL) -1
     144  if (vector->compare == NULL) return NULL
    145145 
    146146  for (i = 0; i < vector->nr_elements; i++) { 
     
    159159  int i; 
    160160 
    161   if (vector->compare == NULL) -1; 
     161  if (vector->compare == NULL) return -1; 
    162162 
    163163  for (i = 0; i < vector->nr_elements; i++) { 
  • liboggz/trunk/src/liboggz/oggz_vector.h

    r2563 r2955  
    3838typedef int (*OggzFunc) (void * data); 
    3939typedef int (*OggzFindFunc) (void * data, long serialno); 
    40 typedef int (*OggzCmpFunc) (void * a, void * b, void * user_data); 
     40typedef int (*OggzCmpFunc) (const void * a, const void * b, void * user_data); 
    4141 
    4242OggzVector * 
  • liboggz/trunk/src/tests/Makefile.am

    r2855 r2955  
    11## Process this file with automake to produce Makefile.in 
    2  
    3 AM_CFLAGS = -Wall -pedantic 
    42 
    53INCLUDES = -I$(top_srcdir)/include @OGG_CFLAGS@ 
  • liboggz/trunk/src/tools/Makefile.am

    r2855 r2955  
    11## Process this file with automake to produce Makefile.in 
    2  
    3 AM_CFLAGS = -Wall -pedantic -g 
    42 
    53EXTRA_DIST = oggzdiff 
  • liboggz/trunk/src/tools/oggz-scan.c

    r2339 r2955  
    3636#include <stdlib.h> 
    3737#include <string.h> 
     38#include <strings.h> 
    3839 
    3940#include <getopt.h> 
  • liboggz/trunk/src/tools/oggz_tools.c

    r2883 r2955  
    189189  samplerate = (ogg_int64_t) (data[27] << 12) | (data[28] << 4) |  
    190190               ((data[29] >> 4)&0xf); 
    191   channels = 1 + (data[29] >> 1)&0x7
     191  channels = 1 + ((data[29] >> 1)&0x7)
    192192 
    193193  snprintf (buf, 60, 
     
    273273   */ 
    274274   
    275   serial_no = ogg_page_serialno(og); 
     275  serial_no = ogg_page_serialno((ogg_page *)og); 
    276276   
    277277  content = oggz_stream_get_content(oggz, serial_no); 
  • liboggz/trunk/src/tools/oggzdump.c

    r2883 r2955  
    3636#include <stdlib.h> 
    3737#include <string.h> 
     38#include <strings.h> 
    3839#include <ctype.h> 
    3940 
  • liboggz/trunk/src/tools/oggzrip.c

    r2339 r2955  
    4040#include <stdlib.h> 
    4141#include <string.h> 
     42#include <strings.h> 
    4243#include <fcntl.h> 
    4344#include <assert.h>