From d17f9943af8aeeca65b327ad22475b4df36a3b2d Mon Sep 17 00:00:00 2001 From: diego Date: Fri, 1 Aug 2008 20:28:58 +0000 Subject: Rename some preprocessor directives from CONFIG_* to HAVE_* where appropriate; CONFIG_ prefix for configurable options, HAVE_ for system-dependent stuff. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27391 b3059339-0415-0410-9bf9-f77b7e298cf2 --- cfg-common-opts.h | 8 ++++---- cfg-mplayer.h | 4 ++-- configure | 20 ++++++++++---------- gui/cfg.c | 2 +- gui/interface.c | 4 ++-- gui/mplayer/gtk/opts.c | 18 +++++++++--------- libass/ass.c | 10 +++++----- libass/ass_mp.c | 2 +- libmenu/menu.c | 6 +++--- libmpdemux/demux_ogg.c | 6 +++--- libvo/font_load_ft.c | 6 +++--- mp_msg.c | 10 +++++----- mplayer.c | 4 ++-- osdep/getch2-os2.c | 6 +++--- osdep/getch2-win.c | 2 +- osdep/getch2.c | 10 +++++----- stream/asf_mmst_streaming.c | 18 +++++++++--------- stream/librtsp/rtsp_rtp.c | 4 ++-- stream/tcp.c | 4 ++-- stream/udp.c | 4 ++-- subreader.c | 24 ++++++++++++------------ 21 files changed, 86 insertions(+), 86 deletions(-) diff --git a/cfg-common-opts.h b/cfg-common-opts.h index 0472ba8d06..14b5f3a9eb 100644 --- a/cfg-common-opts.h +++ b/cfg-common-opts.h @@ -11,7 +11,7 @@ {"msglevel", msgl_config, CONF_TYPE_SUBCONFIG, CONF_GLOBAL, 0, 0, NULL}, {"msgcolor", &mp_msg_color, CONF_TYPE_FLAG, CONF_GLOBAL, 0, 1, NULL}, {"msgmodule", &mp_msg_module, CONF_TYPE_FLAG, CONF_GLOBAL, 0, 1, NULL}, -#ifdef CONFIG_ICONV +#ifdef HAVE_ICONV {"msgcharset", &mp_msg_charset, CONF_TYPE_STRING, CONF_GLOBAL, 0, 0, NULL}, #endif {"include", cfg_include, CONF_TYPE_FUNC_PARAM, CONF_NOSAVE, 0, 0, NULL}, @@ -264,7 +264,7 @@ // ------------------------- subtitles options -------------------- {"sub", &sub_name, CONF_TYPE_STRING_LIST, 0, 0, 0, NULL}, -#ifdef CONFIG_FRIBIDI +#ifdef HAVE_FRIBIDI {"fribidi-charset", &fribidi_charset, CONF_TYPE_STRING, 0, 0, 0, NULL}, {"flip-hebrew", &flip_hebrew, CONF_TYPE_FLAG, 0, 0, 1, NULL}, {"noflip-hebrew", &flip_hebrew, CONF_TYPE_FLAG, 0, 1, 0, NULL}, @@ -276,8 +276,8 @@ {"noflip-hebrew", "MPlayer was compiled without FriBiDi support.\n", CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL}, {"flip-hebrew-commas", "MPlayer was compiled without FriBiDi support.\n", CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL}, {"noflip-hebrew-commas", "MPlayer was compiled without FriBiDi support.\n", CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL}, -#endif /* CONFIG_FRIBIDI */ -#ifdef CONFIG_ICONV +#endif /* HAVE_FRIBIDI */ +#ifdef HAVE_ICONV {"subcp", &sub_cp, CONF_TYPE_STRING, 0, 0, 0, NULL}, #endif {"subdelay", &sub_delay, CONF_TYPE_FLOAT, 0, 0.0, 10.0, NULL}, diff --git a/cfg-mplayer.h b/cfg-mplayer.h index 93f913c963..1195577b03 100644 --- a/cfg-mplayer.h +++ b/cfg-mplayer.h @@ -259,13 +259,13 @@ const m_option_t mplayer_opts[]={ {"menu-startup", &menu_startup, CONF_TYPE_FLAG, CONF_GLOBAL, 0, 1, NULL}, {"menu-keepdir", &menu_keepdir, CONF_TYPE_FLAG, CONF_GLOBAL, 0, 1, NULL}, {"menu-chroot", &menu_chroot, CONF_TYPE_STRING, 0, 0, 0, NULL}, -#ifdef CONFIG_FRIBIDI +#ifdef HAVE_FRIBIDI {"menu-fribidi-charset", &menu_fribidi_charset, CONF_TYPE_STRING, 0, 0, 0, NULL}, {"menu-flip-hebrew", &menu_flip_hebrew, CONF_TYPE_FLAG, 0, 0, 1, NULL}, {"menu-noflip-hebrew", &menu_flip_hebrew, CONF_TYPE_FLAG, 0, 1, 0, NULL}, {"menu-flip-hebrew-commas", &menu_fribidi_flip_commas, CONF_TYPE_FLAG, 0, 1, 0, NULL}, {"menu-noflip-hebrew-commas", &menu_fribidi_flip_commas, CONF_TYPE_FLAG, 0, 0, 1, NULL}, -#endif /* CONFIG_FRIBIDI */ +#endif /* HAVE_FRIBIDI */ #else {"menu", "OSD menu support was not compiled in.\n", CONF_TYPE_PRINT,0, 0, 0, NULL}, #endif /* CONFIG_MENU */ diff --git a/configure b/configure index dcfc9314ca..2bd6c80bb3 100755 --- a/configure +++ b/configure @@ -2598,9 +2598,9 @@ EOF cc_check && _langinfo=yes fi if test "$_langinfo" = yes ; then - _def_langinfo='#define CONFIG_LANGINFO 1' + _def_langinfo='#define HAVE_LANGINFO 1' else - _def_langinfo='#undef CONFIG_LANGINFO' + _def_langinfo='#undef HAVE_LANGINFO' fi echores "$_langinfo" @@ -2859,9 +2859,9 @@ EOF echores "$_use_aton" fi -_def_use_aton='#undef CONFIG_ATON' +_def_use_aton='#undef HAVE_ATON' if test "$_use_aton" = yes; then - _def_use_aton='#define CONFIG_ATON 1' + _def_use_aton='#define HAVE_ATON 1' fi @@ -3169,9 +3169,9 @@ EOF done fi if test "$_iconv" = yes ; then - _def_iconv='#define CONFIG_ICONV 1' + _def_iconv='#define HAVE_ICONV 1' else - _def_iconv='#undef CONFIG_ICONV' + _def_iconv='#undef HAVE_ICONV' fi echores "$_iconv" @@ -3330,10 +3330,10 @@ EOF done fi if test "$_termcap" = yes ; then - _def_termcap='#define CONFIG_TERMCAP 1' + _def_termcap='#define HAVE_TERMCAP 1' _res_comment="using $_ld_tmp" else - _def_termcap='#undef CONFIG_TERMCAP' + _def_termcap='#undef HAVE_TERMCAP' fi echores "$_termcap" @@ -5725,11 +5725,11 @@ EOF fi fi if test "$_fribidi" = yes ; then - _def_fribidi='#define CONFIG_FRIBIDI' + _def_fribidi='#define HAVE_FRIBIDI' _inc_extra="$_inc_extra `$_fribidiconfig --cflags`" _ld_extra="$_ld_extra `$_fribidiconfig --libs`" else - _def_fribidi='#undef CONFIG_FRIBIDI' + _def_fribidi='#undef HAVE_FRIBIDI' fi echores "$_fribidi" diff --git a/gui/cfg.c b/gui/cfg.c index c70d95bff3..3131254edc 100644 --- a/gui/cfg.c +++ b/gui/cfg.c @@ -165,7 +165,7 @@ static const m_option_t gui_opts[] = #endif { "sub_pos",&sub_pos,CONF_TYPE_INT,CONF_RANGE,0,200,NULL }, { "sub_overlap",&suboverlap_enabled,CONF_TYPE_FLAG,0,0,0,NULL }, -#ifdef CONFIG_ICONV +#ifdef HAVE_ICONV { "sub_cp",&sub_cp,CONF_TYPE_STRING,0,0,0,NULL }, #endif { "font_factor",&font_factor,CONF_TYPE_FLOAT,CONF_RANGE,0.0,10.0,NULL }, diff --git a/gui/interface.c b/gui/interface.c index 5884e7befb..a0e5ae72c5 100644 --- a/gui/interface.c +++ b/gui/interface.c @@ -51,7 +51,7 @@ extern af_cfg_t af_cfg; -#ifdef CONFIG_ICONV +#ifdef HAVE_ICONV #include #endif @@ -1107,7 +1107,7 @@ void * gtkSet( int cmd,float fparam, void * vparam ) guiLoadFont(); return NULL; #endif -#ifdef CONFIG_ICONV +#ifdef HAVE_ICONV case gtkSetSubEncoding: gfree( (void **)&sub_cp ); sub_cp=gstrdup( (char *)vparam ); diff --git a/gui/mplayer/gtk/opts.c b/gui/mplayer/gtk/opts.c index 8e78dcb53d..281f49de71 100644 --- a/gui/mplayer/gtk/opts.c +++ b/gui/mplayer/gtk/opts.c @@ -133,11 +133,11 @@ static GtkWidget * RBFontNoAutoScale, * RBFontAutoScaleWidth, * RBFontAutoSc //static GtkWidget * AutoScale; #endif -#ifdef CONFIG_ICONV +#ifdef HAVE_ICONV static GtkWidget * CBSubEncoding, * ESubEncoding; #endif -#if defined(HAVE_FREETYPE) || defined(CONFIG_ICONV) +#if defined(HAVE_FREETYPE) || defined(HAVE_ICONV) static struct { char * name; @@ -188,7 +188,7 @@ static int old_video_driver = 0; static gboolean prHScaler( GtkWidget * widget,GdkEventMotion * event,gpointer user_data ); static void prToggled( GtkToggleButton * togglebutton,gpointer user_data ); static void prCListRow( GtkCList * clist,gint row,gint column,GdkEvent * event,gpointer user_data ); -#if defined(HAVE_FREETYPE) || defined(CONFIG_ICONV) +#if defined(HAVE_FREETYPE) || defined(HAVE_ICONV) static void prEntry( GtkContainer * container,gpointer user_data ); #endif @@ -312,7 +312,7 @@ void ShowPreferences( void ) if ( guiIntfStruct.Subtitlename ) gtk_entry_set_text( GTK_ENTRY( ESubtitleName ),guiIntfStruct.Subtitlename ); #endif -#ifdef CONFIG_ICONV +#ifdef HAVE_ICONV if ( sub_cp ) { int i; @@ -460,7 +460,7 @@ void ShowPreferences( void ) gtk_signal_connect( GTK_OBJECT( HSFontOSDScale ),"motion_notify_event",GTK_SIGNAL_FUNC( prHScaler ),(void*)9 ); gtk_signal_connect( GTK_OBJECT( EFontEncoding ),"changed",GTK_SIGNAL_FUNC( prEntry ),(void *)0 ); #endif -#ifdef CONFIG_ICONV +#ifdef HAVE_ICONV gtk_signal_connect( GTK_OBJECT( ESubEncoding ),"changed",GTK_SIGNAL_FUNC( prEntry ),(void *)1 ); #endif gtk_signal_connect( GTK_OBJECT( HSPPQuality ),"motion_notify_event",GTK_SIGNAL_FUNC( prHScaler ),(void*)10 ); @@ -492,7 +492,7 @@ void HidePreferences( void ) #endif } -#if defined(HAVE_FREETYPE) || defined(CONFIG_ICONV) +#if defined(HAVE_FREETYPE) || defined(HAVE_ICONV) static void prEntry( GtkContainer * container,gpointer user_data ) { const char * comment; @@ -508,7 +508,7 @@ static void prEntry( GtkContainer * container,gpointer user_data ) if ( lEncoding[i].comment ) gtkSet( gtkSetFontEncoding,0,lEncoding[i].name ); break; #endif -#ifdef CONFIG_ICONV +#ifdef HAVE_ICONV case 1: // sub encoding comment=gtk_entry_get_text( GTK_ENTRY( ESubEncoding ) ); for ( i=0;lEncoding[i].name;i++ ) @@ -1030,7 +1030,7 @@ GtkWidget * create_Preferences( void ) label=AddLabel( MSGTR_PREFERENCES_SUB_FPS,NULL ); gtk_table_attach( GTK_TABLE( table1 ),label,0,1,2,3,(GtkAttachOptions)( GTK_FILL ),(GtkAttachOptions)( 0 ),0,0 ); -#ifdef CONFIG_ICONV +#ifdef HAVE_ICONV label=AddLabel( MSGTR_PREFERENCES_FontEncoding,NULL ); gtk_table_attach( GTK_TABLE( table1 ),label,0,1,3,4,(GtkAttachOptions)( GTK_FILL ),(GtkAttachOptions)( 0 ),0,0 ); #endif @@ -1051,7 +1051,7 @@ GtkWidget * create_Preferences( void ) gtk_spin_button_set_numeric( GTK_SPIN_BUTTON( HSSubFPS ),TRUE ); gtk_table_attach( GTK_TABLE( table1 ),HSSubFPS,1,2,2,3,(GtkAttachOptions)( GTK_EXPAND | GTK_FILL ),(GtkAttachOptions)( 0 ),0,0 ); -#ifdef CONFIG_ICONV +#ifdef HAVE_ICONV CBSubEncoding=gtk_combo_new(); gtk_widget_set_name( CBSubEncoding,"CBSubEncoding" ); gtk_widget_show( CBSubEncoding ); diff --git a/libass/ass.c b/libass/ass.c index 659f08c4e3..3f78afa994 100644 --- a/libass/ass.c +++ b/libass/ass.c @@ -32,7 +32,7 @@ #include #include -#ifdef CONFIG_ICONV +#ifdef HAVE_ICONV #include #endif @@ -810,7 +810,7 @@ void ass_process_chunk(ass_track_t* track, char *data, int size, long long timec free(str); } -#ifdef CONFIG_ICONV +#ifdef HAVE_ICONV /** \brief recode buffer to utf-8 * constraint: codepage != 0 * \param data pointer to text buffer @@ -991,7 +991,7 @@ ass_track_t* ass_read_memory(ass_library_t* library, char* buf, size_t bufsize, if (!buf) return 0; -#ifdef CONFIG_ICONV +#ifdef HAVE_ICONV if (codepage) buf = sub_recode(buf, bufsize, codepage); if (!buf) @@ -1017,7 +1017,7 @@ char* read_file_recode(char* fname, char* codepage, int* size) buf = read_file(fname, &bufsize); if (!buf) return 0; -#ifdef CONFIG_ICONV +#ifdef HAVE_ICONV if (codepage) { char* tmpbuf = sub_recode(buf, bufsize, codepage); free(buf); @@ -1071,7 +1071,7 @@ int ass_read_styles(ass_track_t* track, char* fname, char* codepage) buf = read_file(fname, &sz); if (!buf) return 1; -#ifdef CONFIG_ICONV +#ifdef HAVE_ICONV if (codepage) { char* tmpbuf; tmpbuf = sub_recode(buf, sz, codepage); diff --git a/libass/ass_mp.c b/libass/ass_mp.c index 063580e0e5..2e56a93518 100644 --- a/libass/ass_mp.c +++ b/libass/ass_mp.c @@ -65,7 +65,7 @@ extern char* sub_font_name; extern float text_font_scale_factor; extern int subtitle_autoscale; -#ifdef CONFIG_ICONV +#ifdef HAVE_ICONV extern char* sub_cp; #else static char* sub_cp = 0; diff --git a/libmenu/menu.c b/libmenu/menu.c index 8f055ba2c4..b2d88b8526 100644 --- a/libmenu/menu.c +++ b/libmenu/menu.c @@ -403,7 +403,7 @@ static void render_txt(char *txt) } } -#ifdef CONFIG_FRIBIDI +#ifdef HAVE_FRIBIDI #include #include "libavutil/common.h" char *menu_fribidi_charset = NULL; @@ -459,7 +459,7 @@ void menu_draw_text(mp_image_t* mpi,char* txt, int x, int y) { return; } -#ifdef CONFIG_FRIBIDI +#ifdef HAVE_FRIBIDI txt = menu_fribidi(txt); #endif render_txt(txt); @@ -493,7 +493,7 @@ void menu_draw_text_full(mp_image_t* mpi,char* txt, return; } -#ifdef CONFIG_FRIBIDI +#ifdef HAVE_FRIBIDI txt = menu_fribidi(txt); #endif render_txt(txt); diff --git a/libmpdemux/demux_ogg.c b/libmpdemux/demux_ogg.c index 989542df0f..761d332e75 100644 --- a/libmpdemux/demux_ogg.c +++ b/libmpdemux/demux_ogg.c @@ -196,7 +196,7 @@ void demux_ogg_add_sub (ogg_stream_t* os,ogg_packet* pack) { mp_msg(MSGT_DEMUX,MSGL_DBG2,"Ogg sub lines: %d first: '%s'\n", ogg_sub.lines, ogg_sub.text[0]); -#ifdef CONFIG_ICONV +#ifdef HAVE_ICONV subcp_recode(&ogg_sub); #endif vo_sub = &ogg_sub; @@ -745,7 +745,7 @@ int demux_ogg_open(demuxer_t* demuxer) { sh_audio_t* sh_a; sh_video_t* sh_v; -#ifdef CONFIG_ICONV +#ifdef HAVE_ICONV subcp_open(NULL); #endif @@ -1486,7 +1486,7 @@ static void demux_close_ogg(demuxer_t* demuxer) { if(!ogg_d) return; -#ifdef CONFIG_ICONV +#ifdef HAVE_ICONV subcp_close(); #endif diff --git a/libvo/font_load_ft.c b/libvo/font_load_ft.c index 34749d5232..63368f3f77 100644 --- a/libvo/font_load_ft.c +++ b/libvo/font_load_ft.c @@ -16,7 +16,7 @@ #include #include -#ifdef CONFIG_ICONV +#ifdef HAVE_ICONV #include #endif @@ -716,7 +716,7 @@ static int generate_tables(font_desc_t *desc, double thickness, double radius) return 0; } -#ifdef CONFIG_ICONV +#ifdef HAVE_ICONV /* decode from 'encoding' to unicode */ static FT_ULong decode_char(iconv_t *cd, char c) { FT_ULong o; @@ -1009,7 +1009,7 @@ font_desc_t* read_font_desc_ft(const char *fname, int movie_width, int movie_hei } desc->face_cnt++; -#ifdef CONFIG_ICONV +#ifdef HAVE_ICONV if (unicode) { charset_size = prepare_charset_unicode(face, my_charset, my_charcodes); } else { diff --git a/mp_msg.c b/mp_msg.c index 2f9f32c098..58d1d32caf 100644 --- a/mp_msg.c +++ b/mp_msg.c @@ -5,7 +5,7 @@ #include "config.h" -#ifdef CONFIG_ICONV +#ifdef HAVE_ICONV #include #include extern char* get_term_charset(void); @@ -29,7 +29,7 @@ int mp_msg_level_all = MSGL_STATUS; int verbose = 0; int mp_msg_color = 0; int mp_msg_module = 0; -#ifdef CONFIG_ICONV +#ifdef HAVE_ICONV char *mp_msg_charset = NULL; static char *old_charset = NULL; static iconv_t msgiconv; @@ -37,7 +37,7 @@ static iconv_t msgiconv; const char* filename_recode(const char* filename) { -#if !defined(CONFIG_ICONV) || !defined(MSG_CHARSET) +#if !defined(HAVE_ICONV) || !defined(MSG_CHARSET) return filename; #else static iconv_t inv_msgiconv = (iconv_t)(-1); @@ -73,7 +73,7 @@ void mp_msg_init(void){ verbose = atoi(env); for(i=0;i #include #endif @@ -182,12 +182,12 @@ void getch2_disable( void ) getch2_status = 0; } -#ifdef CONFIG_ICONV +#ifdef HAVE_ICONV char *get_term_charset( void ) { char *charset = NULL; -#ifdef CONFIG_LANGINFO +#ifdef HAVE_LANGINFO setlocale( LC_CTYPE, ""); charset = nl_langinfo( CODESET ); setlocale( LC_CTYPE, "C"); diff --git a/osdep/getch2-win.c b/osdep/getch2-win.c index 83d502f7c7..d956b6fa5b 100644 --- a/osdep/getch2-win.c +++ b/osdep/getch2-win.c @@ -142,7 +142,7 @@ void getch2_disable(){ getch2_status=0; } -#ifdef CONFIG_ICONV +#ifdef HAVE_ICONV static const struct { unsigned cp; char* alias; diff --git a/osdep/getch2.c b/osdep/getch2.c index abdd482d9c..2d7fe8a14b 100644 --- a/osdep/getch2.c +++ b/osdep/getch2.c @@ -2,7 +2,7 @@ #include "config.h" -//#define CONFIG_TERMCAP +//#define HAVE_TERMCAP #if !defined(__OS2__) && !defined(__MORPHOS__) #define CONFIG_IOCTL #endif @@ -28,7 +28,7 @@ #endif #endif -#if defined(CONFIG_LANGINFO) && defined(CONFIG_ICONV) +#if defined(HAVE_LANGINFO) && defined(HAVE_ICONV) #include #include #endif @@ -56,7 +56,7 @@ typedef struct { static keycode_st getch2_keys[MAX_KEYS]; static int getch2_key_db=0; -#ifdef CONFIG_TERMCAP +#ifdef HAVE_TERMCAP #if 0 #include @@ -270,11 +270,11 @@ void getch2_disable(void){ getch2_status=0; } -#ifdef CONFIG_ICONV +#ifdef HAVE_ICONV char* get_term_charset(void) { char* charset = NULL; -#ifdef CONFIG_LANGINFO +#ifdef HAVE_LANGINFO setlocale(LC_CTYPE, ""); charset = nl_langinfo(CODESET); setlocale(LC_CTYPE, "C"); diff --git a/stream/asf_mmst_streaming.c b/stream/asf_mmst_streaming.c index 2ce21f481a..2ca7876ad8 100644 --- a/stream/asf_mmst_streaming.c +++ b/stream/asf_mmst_streaming.c @@ -46,12 +46,12 @@ #endif #ifndef CONFIG_SETLOCALE -#undef CONFIG_ICONV +#undef HAVE_ICONV #endif -#ifdef CONFIG_ICONV +#ifdef HAVE_ICONV #include -#ifdef CONFIG_LANGINFO +#ifdef HAVE_LANGINFO #include #endif #endif @@ -143,13 +143,13 @@ static void send_command (int s, int command, uint32_t switches, } } -#ifdef CONFIG_ICONV +#ifdef HAVE_ICONV static iconv_t url_conv; #endif static void string_utf16(char *dest, char *src, int len) { int i; -#ifdef CONFIG_ICONV +#ifdef HAVE_ICONV size_t len1, len2; char *ip, *op; @@ -172,7 +172,7 @@ static void string_utf16(char *dest, char *src, int len) { /* trailing zeroes */ dest[i*2] = 0; dest[i*2+1] = 0; -#ifdef CONFIG_ICONV +#ifdef HAVE_ICONV } #endif } @@ -575,8 +575,8 @@ int asf_mmst_streaming_start(stream_t *stream) * */ /* prepare for the url encoding conversion */ -#ifdef CONFIG_ICONV -#ifdef CONFIG_LANGINFO +#ifdef HAVE_ICONV +#ifdef HAVE_LANGINFO url_conv = iconv_open("UTF-16LE",nl_langinfo(CODESET)); #else url_conv = iconv_open("UTF-16LE", NULL); @@ -690,7 +690,7 @@ int asf_mmst_streaming_start(stream_t *stream) packet_length1 = packet_length; mp_msg(MSGT_NETWORK,MSGL_INFO,"mmst packet_length = %d\n", packet_length); -#ifdef CONFIG_ICONV +#ifdef HAVE_ICONV if (url_conv != (iconv_t)(-1)) iconv_close(url_conv); #endif diff --git a/stream/librtsp/rtsp_rtp.c b/stream/librtsp/rtsp_rtp.c index beda0dac4f..b582b1a700 100644 --- a/stream/librtsp/rtsp_rtp.c +++ b/stream/librtsp/rtsp_rtp.c @@ -297,7 +297,7 @@ rtp_connect (char *hostname, int port) sin.sin_addr.s_addr = htonl (INADDR_ANY); else #ifndef HAVE_WINSOCK2 -#ifdef CONFIG_ATON +#ifdef HAVE_ATON inet_aton (hostname, &sin.sin_addr); #else inet_pton (AF_INET, hostname, &sin.sin_addr); @@ -386,7 +386,7 @@ is_multicast_address (char *addr) sin.sin_family = AF_INET; #ifndef HAVE_WINSOCK2 -#ifdef CONFIG_ATON +#ifdef HAVE_ATON inet_aton (addr, &sin.sin_addr); #else inet_pton (AF_INET, addr, &sin.sin_addr); diff --git a/stream/tcp.c b/stream/tcp.c index f4c71f651d..950c434886 100644 --- a/stream/tcp.c +++ b/stream/tcp.c @@ -116,7 +116,7 @@ connect2Server_with_af(char *host, int port, int af,int verb) { memset(&server_address, 0, sizeof(server_address)); #ifndef HAVE_WINSOCK2 -#ifdef CONFIG_ATON +#ifdef HAVE_ATON if (inet_aton(host, our_s_addr)!=1) #else if (inet_pton(af, host, our_s_addr)!=1) @@ -164,7 +164,7 @@ connect2Server_with_af(char *host, int port, int af,int verb) { return TCP_ERROR_FATAL; } -#if defined(CONFIG_ATON) || defined(HAVE_WINSOCK2) +#if defined(HAVE_ATON) || defined(HAVE_WINSOCK2) strncpy( buf, inet_ntoa( *((struct in_addr*)our_s_addr) ), 255); #else inet_ntop(af, our_s_addr, buf, 255); diff --git a/stream/udp.c b/stream/udp.c index 7ad2542ba1..759c5a9675 100644 --- a/stream/udp.c +++ b/stream/udp.c @@ -92,11 +92,11 @@ udp_open_socket (URL_t *url) else { #ifndef HAVE_WINSOCK2 -#ifdef CONFIG_ATON +#ifdef HAVE_ATON inet_aton (url->hostname, &server_address.sin_addr); #else inet_pton (AF_INET, url->hostname, &server_address.sin_addr); -#endif /* CONFIG_ATON */ +#endif /* HAVE_ATON */ #else server_address.sin_addr.s_addr = htonl(INADDR_ANY); #endif /* HAVE_WINSOCK2 */ diff --git a/subreader.c b/subreader.c index 16bcad625f..3d607a6a10 100644 --- a/subreader.c +++ b/subreader.c @@ -26,11 +26,11 @@ #define ERR ((void *) -1) -#ifdef CONFIG_ICONV +#ifdef HAVE_ICONV #include char *sub_cp=NULL; #endif -#ifdef CONFIG_FRIBIDI +#ifdef HAVE_FRIBIDI #include char *fribidi_charset = NULL; ///character set that will be passed to FriBiDi int flip_hebrew = 1; ///flip subtitles using fribidi @@ -1071,7 +1071,7 @@ int sub_utf8_prev=0; extern float sub_delay; extern float sub_fps; -#ifdef CONFIG_ICONV +#ifdef HAVE_ICONV static iconv_t icdsc = (iconv_t)(-1); void subcp_open (stream_t *st) @@ -1146,7 +1146,7 @@ subtitle* subcp_recode (subtitle *sub) } #endif -#ifdef CONFIG_FRIBIDI +#ifdef HAVE_FRIBIDI #ifndef max #define max(a,b) (((a)>(b))?(a):(b)) #endif @@ -1369,7 +1369,7 @@ sub_data* sub_read_file (char *filename, float fps) { stream_reset(fd); stream_seek(fd,0); -#ifdef CONFIG_ICONV +#ifdef HAVE_ICONV sub_utf8_prev=sub_utf8; { int l,k; @@ -1389,7 +1389,7 @@ sub_data* sub_read_file (char *filename, float fps) { sub_num=0;n_max=32; first=malloc(n_max*sizeof(subtitle)); if(!first){ -#ifdef CONFIG_ICONV +#ifdef HAVE_ICONV subcp_close(); sub_utf8=sub_utf8_prev; #endif @@ -1413,15 +1413,15 @@ sub_data* sub_read_file (char *filename, float fps) { memset(sub, '\0', sizeof(subtitle)); sub=srp->read(fd,sub); if(!sub) break; // EOF -#ifdef CONFIG_ICONV +#ifdef HAVE_ICONV if ((sub!=ERR) && (sub_utf8 & 2)) sub=subcp_recode(sub); #endif -#ifdef CONFIG_FRIBIDI +#ifdef HAVE_FRIBIDI if (sub!=ERR) sub=sub_fribidi(sub,sub_utf8); #endif if ( sub == ERR ) { -#ifdef CONFIG_ICONV +#ifdef HAVE_ICONV subcp_close(); #endif if ( first ) free(first); @@ -1474,7 +1474,7 @@ sub_data* sub_read_file (char *filename, float fps) { free_stream(fd); -#ifdef CONFIG_ICONV +#ifdef HAVE_ICONV subcp_close(); #endif @@ -1876,7 +1876,7 @@ char** sub_filenames(const char* path, char *fname) // does it end with a subtitle extension? found = 0; -#ifdef CONFIG_ICONV +#ifdef HAVE_ICONV #ifdef HAVE_ENCA for (i = ((sub_cp && strncasecmp(sub_cp, "enca", 4) != 0) ? 3 : 0); sub_exts[i]; i++) { #else @@ -1931,7 +1931,7 @@ char** sub_filenames(const char* path, char *fname) if (prio) { prio += prio; -#ifdef CONFIG_ICONV +#ifdef HAVE_ICONV if (i<3){ // prefer UTF-8 coded prio++; } -- cgit v1.2.3