changeset 33884:514016233368

build: drop BeOS support BeOS is dead and support has been dropped from FFmpeg/Libav a long time ago. The support code that was added years ago adds considerable clutter while not providing any benefit, so it's better to drop it outright. Support for Haiku, the FOSS replacement of BeOS remains unaffected.
author diego
date Thu, 11 Aug 2011 17:45:43 +0000
parents 7bf488338904
children d3fb4ca54ce3
files Makefile configure cpuinfo.c mpbswap.h osdep/shmem.c osdep/swab.c osdep/timer-linux.c
diffstat 7 files changed, 6 insertions(+), 91 deletions(-) [+]
line wrap: on
line diff
--- a/Makefile	Thu Aug 11 17:45:41 2011 +0000
+++ b/Makefile	Thu Aug 11 17:45:43 2011 +0000
@@ -183,7 +183,6 @@
 SRCS_COMMON-$(NEED_SETENV)           += osdep/setenv.c
 SRCS_COMMON-$(NEED_SHMEM)            += osdep/shmem.c
 SRCS_COMMON-$(NEED_STRSEP)           += osdep/strsep.c
-SRCS_COMMON-$(NEED_SWAB)             += osdep/swab.c
 SRCS_COMMON-$(NEED_VSSCANF)          += osdep/vsscanf.c
 SRCS_COMMON-$(NETWORKING)            += stream/stream_netstream.c \
                                         stream/asf_mmst_streaming.c \
--- a/configure	Thu Aug 11 17:45:41 2011 +0000
+++ b/configure	Thu Aug 11 17:45:43 2011 +0000
@@ -208,7 +208,6 @@
 }
 aix()       { issystem "AIX"; }
 amigaos()   { issystem "AmigaOS"; }
-beos()      { issystem "BEOS"; }
 bsdos()     { issystem "BSD/OS"; }
 cygwin()    { issystem "CYGWIN"; }
 darwin()    { issystem "Darwin"; }
@@ -1436,10 +1435,7 @@
   # OS name
   system_name=$(uname -s 2>&1)
   case "$system_name" in
-  Linux|FreeBSD|NetBSD|OpenBSD|DragonFly|BSD/OS|Darwin|SunOS|QNX|GNU|BeOS|MorphOS|AIX|AmigaOS)
-    ;;
-  Haiku)
-    system_name=BeOS
+  Linux|FreeBSD|NetBSD|OpenBSD|DragonFly|BSD/OS|Darwin|SunOS|QNX|GNU|MorphOS|AIX|AmigaOS|Haiku)
     ;;
   IRIX*)
     system_name=IRIX
@@ -1467,7 +1463,7 @@
 
   # host's CPU/instruction set
   case "$(uname -m 2>&1)" in
-      x86_64|amd64|i[3-9]86*|x86|x86pc|k5|k6|k6_2|k6_3|k6-2|k6-3|pentium*|athlon*|i586_i686|i586-i686|BePC) host_arch=i386 ;;
+      x86_64|amd64|i[3-9]86*|x86|x86pc|k5|k6|k6_2|k6_3|k6-2|k6-3|pentium*|athlon*|i586_i686|i586-i686) host_arch=i386 ;;
       ia64) host_arch=ia64 ;;
       macppc|ppc|Power*) host_arch=ppc ;;
       ppc64) host_arch=ppc64 ;;
@@ -1508,6 +1504,7 @@
 fi
 
 extra_cflags="-I. -Iffmpeg $extra_cflags"
+extra_ldflags="-lm $extra_ldflags"
 _timer=timer-linux.c
 _getch=getch2.c
 if freebsd ; then
@@ -2941,23 +2938,6 @@
 ######################
 
 
-echocheck "-lposix"
-if cflag_check -lposix ; then
-  extra_ldflags="$extra_ldflags -lposix"
-  echores "yes"
-else
-  echores "no"
-fi
-
-echocheck "-lm"
-if cflag_check -lm ; then
-  extra_ldflags="$extra_ldflags -lm"
-  echores "yes"
-else
-  echores "no"
-fi
-
-
 echocheck "langinfo"
 if test "$_langinfo" = auto ; then
   _langinfo=no
@@ -3117,14 +3097,13 @@
 
 echocheck "socklib"
 # for Solaris (socket stuff is in -lsocket, gethostbyname and friends in -lnsl):
-# for BeOS (socket stuff is in -lsocket, gethostbyname and friends in -lbind):
 cat > $TMPC << EOF
 #include <netdb.h>
 #include <sys/socket.h>
 int main(void) { gethostbyname(0); socket(AF_INET, SOCK_STREAM, 0); return 0; }
 EOF
 _socklib=no
-for ld_tmp in "" "-lsocket -lbind" "-lsocket -ldnet" "-lsocket -lnsl" "-lnsl" "-lsocket" ; do
+for ld_tmp in "" "-lsocket -ldnet" "-lsocket -lnsl" "-lnsl" "-lsocket" ; do
   cc_check $ld_tmp && ld_sock="$ld_tmp" && _socklib=yes && break
 done
 test $_socklib = yes && test $_winsock2_h = auto && _winsock2_h=no
@@ -3835,19 +3814,6 @@
 echores "$_vsscanf"
 
 
-echocheck "swab()"
-_swab=no
-define_statement_check "_XOPEN_SOURCE 600" "unistd.h" 'int a, b; swab(&a, &b, 0)' ||
-    statement_check "string.h" 'int a, b; swab(&a, &b, 0)' && _swab=yes
-if test "$_swab" = yes ; then
-  def_swab='#define HAVE_SWAB 1'
-  need_swab=no
-else
-  def_swab='#undef HAVE_SWAB'
-  need_swab=yes
-fi
-echores "$_swab"
-
 echocheck "POSIX select()"
 cat > $TMPC << EOF
 #include <stdio.h>
@@ -5034,7 +5000,7 @@
     if cc_check $inc_tmp $ld_tmp >>"$TMPLOG" 2>&1 ; then
           _sdl=yes
     elif cc_check $inc_tmp $ld_tmp -lstdc++ >>"$TMPLOG" 2>&1 ; then
-          # HACK for BeOS/Haiku SDL
+          # HACK for Haiku SDL
           ld_tmp="$ld_tmp -lstdc++"
           _sdl=yes
      fi
@@ -5839,8 +5805,6 @@
     extra_ldflags="$extra_ldflags -framework IOKit -framework Carbon"
   elif cygwin ; then
     cflags_libdvdcss="-DSYS_CYGWIN -DWIN32"
-  elif beos ; then
-    cflags_libdvdcss="-DSYS_BEOS"
   elif os2 ; then
     cflags_libdvdcss="-DSYS_OS2"
   fi
@@ -7435,7 +7399,7 @@
 
 
 echocheck "ftp"
-if test "$_ftp" = "auto" && test "$networking" = "yes" && ! beos ; then
+if test "$_ftp" = "auto" && test "$networking" = "yes" ; then
     _ftp=yes
 fi
 if test "$_ftp" = yes ; then
@@ -7911,7 +7875,6 @@
 NEED_SETENV       = $need_setenv
 NEED_SHMEM        = $need_shmem
 NEED_STRSEP       = $need_strsep
-NEED_SWAB         = $need_swab
 NEED_VSSCANF      = $need_vsscanf
 
 # features
@@ -8268,7 +8231,6 @@
 $def_setmode
 $def_shm
 $def_strsep
-$def_swab
 $def_sysi86
 $def_sysi86_iv
 $def_termcap
--- a/cpuinfo.c	Thu Aug 11 17:45:41 2011 +0000
+++ b/cpuinfo.c	Thu Aug 11 17:45:43 2011 +0000
@@ -32,10 +32,6 @@
 #define sleep(t) Sleep(1000*t);
 #endif
 
-#ifdef __BEOS__
-#define usleep(t) snooze(t)
-#endif
-
 #ifdef M_UNIX
 typedef long long int64_t;
 #define MISSING_USLEEP
--- a/mpbswap.h	Thu Aug 11 17:45:41 2011 +0000
+++ b/mpbswap.h	Thu Aug 11 17:45:43 2011 +0000
@@ -31,8 +31,4 @@
 #define be2me_16(v) av_be2ne16(v)
 #define be2me_32(v) av_be2ne32(v)
 
-#ifndef HAVE_SWAB
-void swab(const void *from, void *to, ssize_t n);
-#endif
-
 #endif /* MPLAYER_MPBSWAP_H */
--- a/osdep/shmem.c	Thu Aug 11 17:45:41 2011 +0000
+++ b/osdep/shmem.c	Thu Aug 11 17:45:43 2011 +0000
@@ -33,8 +33,6 @@
 #include <sys/uio.h>
 #if HAVE_SYS_MMAN_H
 #include <sys/mman.h>
-#elif defined(__BEOS__)
-#include <mman.h>
 #endif
 #include <sys/socket.h>
 #include <fcntl.h>
--- a/osdep/swab.c	Thu Aug 11 17:45:41 2011 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,33 +0,0 @@
-/*
- * This file is part of MPlayer.
- *
- * MPlayer is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * MPlayer is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with MPlayer; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- */
-
-#include "config.h"
-
-/* system has no swab.  emulate via bswap */
-#include "mpbswap.h"
-#include <unistd.h>
-
-void swab(const void *from, void *to, ssize_t n) {
-  const int16_t *in = (int16_t*)from;
-  int16_t *out = (int16_t*)to;
-  int i;
-  n /= 2;
-  for (i = 0 ; i < n; i++) {
-    out[i] = bswap_16(in[i]);
-  }
-}
--- a/osdep/timer-linux.c	Thu Aug 11 17:45:41 2011 +0000
+++ b/osdep/timer-linux.c	Thu Aug 11 17:45:43 2011 +0000
@@ -20,9 +20,6 @@
  */
 
 #include <unistd.h>
-#ifdef __BEOS__
-#define usleep(t) snooze(t)
-#endif
 #include <stdlib.h>
 #include <time.h>
 #include <sys/time.h>