changeset 22751:3d83d77f5a6b

Invert logic for HAVE_NO_POSIX_SELECT to HAVE_POSIX_SELECT to be in line with the other HAVE_ #defines throughout the codebase.
author diego
date Wed, 21 Mar 2007 08:24:20 +0000
parents 8e7b3260e985
children 936f98562a5f
files configure input/input.c libmpcodecs/vf.c libmpcodecs/vf_bmovl.c mplayer.c
diffstat 5 files changed, 17 insertions(+), 20 deletions(-) [+]
line wrap: on
line diff
--- a/configure	Tue Mar 20 22:32:38 2007 +0000
+++ b/configure	Wed Mar 21 08:24:20 2007 +0000
@@ -3518,12 +3518,9 @@
 int main(void) {int nfds = 1; fd_set readfds; struct timeval timeout; select(nfds,&readfds,NULL,NULL,&timeout); return 0; }
 EOF
 _posix_select=no
-cc_check && _posix_select=yes
-if test "$_posix_select" = no ; then
-  _def_no_posix_select='#define HAVE_NO_POSIX_SELECT 1'
-else
-  _def_no_posix_select='#undef HAVE_NO_POSIX_SELECT'
-fi
+_def_posix_select='#undef HAVE_POSIX_SELECT'
+cc_check && _posix_select=yes \
+  && _def_posix_select='#define HAVE_POSIX_SELECT 1'
 echores "$_posix_select"
 
 
@@ -7922,7 +7919,7 @@
 $_def_swab
 
 /* Define this if your system has no posix select */
-$_def_no_posix_select
+$_def_posix_select
 
 /* Define this if your system has gettimeofday */
 $_def_gettimeofday
--- a/input/input.c	Tue Mar 20 22:32:38 2007 +0000
+++ b/input/input.c	Wed Mar 21 08:24:20 2007 +0000
@@ -934,7 +934,7 @@
 
 int
 mp_input_read_key_code(int time) {
-#ifndef HAVE_NO_POSIX_SELECT
+#ifdef HAVE_POSIX_SELECT
   fd_set fds;
   struct timeval tv,*time_val;
 #endif
@@ -948,7 +948,7 @@
     return MP_INPUT_NOTHING;
   }
 
-#ifndef HAVE_NO_POSIX_SELECT
+#ifdef HAVE_POSIX_SELECT
   FD_ZERO(&fds);
 #endif
   // Remove fd marked as dead and build the fd_set
@@ -962,13 +962,13 @@
       continue;
     if(key_fds[i].fd > max_fd)
       max_fd = key_fds[i].fd;
-#ifndef HAVE_NO_POSIX_SELECT
+#ifdef HAVE_POSIX_SELECT
     FD_SET(key_fds[i].fd,&fds);
 #endif
     n++;
   }
 
-#ifndef HAVE_NO_POSIX_SELECT
+#ifdef HAVE_POSIX_SELECT
 // if we have fd's without MP_FD_NO_SELECT flag, call select():
 if(n>0){
 
@@ -1001,7 +1001,7 @@
       last_loop %= (num_key_fd+1);
       continue;
     }
-#ifndef HAVE_NO_POSIX_SELECT
+#ifdef HAVE_POSIX_SELECT
     // No input from this fd
     if(! (key_fds[i].flags & MP_FD_NO_SELECT) && ! FD_ISSET(key_fds[i].fd,&fds) && key_fds[i].fd != 0)
       continue;
@@ -1124,7 +1124,7 @@
 
 static mp_cmd_t*
 mp_input_read_cmds(int time) {
-#ifndef HAVE_NO_POSIX_SELECT
+#ifdef HAVE_POSIX_SELECT
   fd_set fds;
   struct timeval tv,*time_val;
 #endif
@@ -1135,7 +1135,7 @@
   if(num_cmd_fd == 0)
     return NULL;
 
-#ifndef HAVE_NO_POSIX_SELECT
+#ifdef HAVE_POSIX_SELECT
   FD_ZERO(&fds);
 #endif
   for(i = 0; (unsigned int)i < num_cmd_fd ; i++) {
@@ -1149,7 +1149,7 @@
       got_cmd = 1;
     if(cmd_fds[i].fd > max_fd)
       max_fd = cmd_fds[i].fd;
-#ifndef HAVE_NO_POSIX_SELECT
+#ifdef HAVE_POSIX_SELECT
     FD_SET(cmd_fds[i].fd,&fds);
 #endif
     n++;
@@ -1158,7 +1158,7 @@
   if(num_cmd_fd == 0)
     return NULL;
 
-#ifndef HAVE_NO_POSIX_SELECT
+#ifdef HAVE_POSIX_SELECT
   if(time >= 0) {
     tv.tv_sec=time/1000; 
     tv.tv_usec = (time%1000)*1000;
@@ -1189,7 +1189,7 @@
       last_loop %= (num_cmd_fd+1);
       continue;
     }
-#ifndef HAVE_NO_POSIX_SELECT
+#ifdef HAVE_POSIX_SELECT
     if( ! (cmd_fds[i].flags & MP_FD_NO_SELECT) && ! FD_ISSET(cmd_fds[i].fd,&fds) && ! (cmd_fds[i].flags & MP_FD_GOT_CMD) )
       continue;
 #endif
--- a/libmpcodecs/vf.c	Tue Mar 20 22:32:38 2007 +0000
+++ b/libmpcodecs/vf.c	Wed Mar 21 08:24:20 2007 +0000
@@ -102,7 +102,7 @@
 // list of available filters:
 static vf_info_t* filter_list[]={
     &vf_info_rectangle,
-#ifndef HAVE_NO_POSIX_SELECT
+#ifdef HAVE_POSIX_SELECT
     &vf_info_bmovl,
 #endif
     &vf_info_crop,
--- a/libmpcodecs/vf_bmovl.c	Tue Mar 20 22:32:38 2007 +0000
+++ b/libmpcodecs/vf_bmovl.c	Wed Mar 21 08:24:20 2007 +0000
@@ -68,7 +68,7 @@
 #include "vf.h"
 #include "img_format.h"
 
-#ifndef HAVE_NO_POSIX_SELECT
+#ifdef HAVE_POSIX_SELECT
 
 #include "mp_msg.h"
 #include "libavutil/common.h"
--- a/mplayer.c	Tue Mar 20 22:32:38 2007 +0000
+++ b/mplayer.c	Wed Mar 21 08:24:20 2007 +0000
@@ -2593,7 +2593,7 @@
   mp_input_add_cmd_fd(0,0,mp_input_win32_slave_cmd_func,NULL);
 #endif
 else if(!noconsolecontrols)
-#ifndef HAVE_NO_POSIX_SELECT
+#ifdef HAVE_POSIX_SELECT
   mp_input_add_key_fd(0,1,NULL,NULL);
 #else
   mp_input_add_key_fd(0,0,NULL,NULL);