Ticket #8789: scummvm_beos.2.patch

File scummvm_beos.2.patch, 3.0 KB (added by SF/begasus, 16 years ago)

beos patch nr2

  • configure

    old new  
    955955echo_n "Checking hosttype... "
    956956echo $_host_os
    957957case $_host_os in
    958         linux* | uclinux* | openbsd* | freebsd* | netbsd* | bsd* | sunos* | hpux* | beos*)
     958        linux* | uclinux* | openbsd* | freebsd* | netbsd* | bsd* | sunos* | hpux* )
    959959                DEFINES="$DEFINES -DUNIX"
    960960                ;;
     961        beos*)
     962                DEFINES="$DEFINES -DUNIX -DSYSTEM_NOT_SUPPORTING_D_TYPE"
     963                LIBS="$LIBS -lbind -lsocket"
     964                LDFLAGS="$LDFLAGS"
     965                type_1_byte='char'
     966                type_2_byte='short'
     967                type_4_byte='long'
     968                ;;
    961969        solaris*)
    962970                DEFINES="$DEFINES -DUNIX -DSYSTEM_NOT_SUPPORTING_D_TYPE"
    963971                ;;
     
    12661274fi
    12671275
    12681276#
     1277# Check for math lib
     1278#
     1279cc_check $LDFLAGS $CXXFLAGS -lm && LDFLAGS="$LDFLAGS -lm"
     1280
     1281#
    12691282# Check for Ogg Vorbis
    12701283#
    12711284echocheck "Ogg Vorbis"
     
    12761289int main(void) { vorbis_packet_blocksize(0,0); return 0; }
    12771290EOF
    12781291        cc_check $LDFLAGS $CXXFLAGS $OGG_CFLAGS $OGG_LIBS $VORBIS_CFLAGS $VORBIS_LIBS \
    1279                 -lvorbisfile -lvorbis -logg -lm && _vorbis=yes
     1292                -lvorbisfile -lvorbis -logg && _vorbis=yes
    12801293fi
    12811294if test "$_vorbis" = yes ; then
    12821295        _def_vorbis='#define USE_VORBIS'
     
    13281341int main(void) { return FLAC__STREAM_SYNC_LEN >> 30; /* guaranteed to be 0 */ }
    13291342EOF
    13301343        cc_check $LDFLAGS $CXXFLAGS $FLAC_CFLAGS $FLAC_LIBS $OGG_CFLAGS $OGG_LIBS \
    1331                 -lFLAC -logg -lm && _flac=yes
     1344                -lFLAC -logg && _flac=yes
    13321345fi
    13331346if test "$_flac" = yes ; then
    13341347        _def_flac='#define USE_FLAC'
  • common/hashmap.h

    old new  
    1818 * along with this program; if not, write to the Free Software
    1919 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
    2020 *
    21  * $URL: https://scummvm.svn.sourceforge.net/svnroot/scummvm/scummvm/branches/branch-0-11-0/common/hashmap.h $
    22  * $Id: hashmap.h 30484 2008-01-14 19:01:08Z fingolfin $
     21 * $URL$
     22 * $Id$
    2323 *
    2424 */
    2525
     
    8686template <class Key, class Val, class HashFunc = Hash<Key>, class EqualFunc = EqualTo<Key> >
    8787class HashMap {
    8888private:
    89 #if defined (PALMOS_MODE)
     89#if defined (PALMOS_MODE) || defined (__BEOS__)
    9090public:
    9191#endif
    9292
     
    116116        int lookupAndCreateIfMissing(const Key &key);
    117117        void expand_array(uint newsize);
    118118
     119        class ConstIterator;
     120
    119121        /**
    120122         * Simple HashMap iterator implementation.
    121123         */
     
    135137
    136138                Node *deref() const {
    137139                        assert(_hashmap != 0);
     140                        assert(_idx < _arrsize);
    138141                        Node *node = _hashmap->_arr[_idx];
    139142                        assert(node != 0);
    140143                        return node;
     
    172175         * This is almost completely identical to the normal iterator class, only
    173176         * with some const keywords added here and there, plus a conversion
    174177         * operator which makes it possible to transparently convert iterators to
    175          * const iterators. 
     178         * const iterators.
    176179         * It is sadly not really possible to reduce this code duplication using
    177180         * template, unless one is willing to accept various warnings on certain
    178181         * compilers. Note that many (most? all?) implementations of the standard