Ticket #202: mozilla-1.0.1.patch

File mozilla-1.0.1.patch, 17.1 KB (added by tushar@…, 22 years ago)

mozilla-1.0.1 patch to be placed on the ftp site

  • build/unix/run-mozilla.sh

    diff -Nur mozilla.orig/build/unix/run-mozilla.sh mozilla/build/unix/run-mozilla.sh
    old new  
    6565#
    6666cmdname=`basename $0`
    6767MOZ_DIST_BIN=`dirname $0`
    68 MOZ_DEFAULT_NAME="./${cmdname}-bin"
    69 MOZ_APPRUNNER_NAME="./mozilla-bin"
    70 MOZ_VIEWER_NAME="./viewer"
     68MOZ_DEFAULT_NAME="${MOZ_DIST_BIN}/${cmdname}-bin"
     69MOZ_APPRUNNER_NAME="${MOZ_DIST_BIN}/mozilla-bin"
     70MOZ_VIEWER_NAME="${MOZ_DIST_BIN}/viewer"
    7171MOZ_PROGRAM=""
     72MOZ_CLIENT_PROGRAM="${MOZ_DIST_BIN}/mozilla-xremote-client"
    7273
    7374exitcode=0
    7475#
     
    131132        return 0
    132133}
    133134##########################################################################
     135function check_running() {
     136    $MOZ_CLIENT_PROGRAM 'ping()' 2>/dev/null >/dev/null
     137    RETURN_VAL=$?
     138    if [ "$RETURN_VAL" -eq "2" ]; then
     139      echo 0
     140      return 0
     141    else
     142      echo 1
     143      return 1
     144    fi
     145}
     146##########################################################################
    134147moz_get_debugger()
    135148{
    136149        debuggers="ddd gdb dbx bdb"
     
    349362## Set MOZILLA_FIVE_HOME
    350363##
    351364MOZILLA_FIVE_HOME=$MOZ_DIST_BIN
     365export XPCOM_CHECK_THREADSAFE=0
    352366
    353367if [ -z "$MRE_HOME" ]; then
    354368    MRE_HOME=$MOZILLA_FIVE_HOME
     
    429443
    430444if [ $moz_debug -eq 1 ]
    431445then
    432         moz_debug_program ${1+"$@"}
     446  moz_debug_program ${1+"$@"}
    433447else
    434         moz_run_program ${1+"$@"}
     448  USE_EXIST=1
     449  ALREADY_RUNNING=`check_running`
     450  if [ "${ALREADY_RUNNING}" -eq "1" ] && [ -n "$1" ]; then
     451    USE_EXIST=0
     452    opt="$1"
     453    case "$opt" in
     454      -mail)
     455        exec $MOZ_CLIENT_PROGRAM 'xfeDoCommand(openInbox)'
     456        ;;
     457      -compose)
     458        exec $MOZ_CLIENT_PROGRAM 'xfeDoCommand(composeMessage)'
     459        ;;
     460      -*) ;;
     461      *) USE_EXIST=1 ;;
     462    esac
     463  fi
     464  if [ "${ALREADY_RUNNING}" -eq "1" ] && [ "${USE_EXIST}" -eq "1" ]; then
     465    # If there is no command line argument at all then try to open a new
     466    # window in an already running instance.
     467    if [ -z "$1" ]; then
     468      exec $MOZ_CLIENT_PROGRAM "xfeDoCommand(openBrowser)"
     469    fi
     470
     471    # check to make sure that the command contains at least a :/ in it.
     472    echo $opt | grep -e ':/' 2>/dev/null > /dev/null
     473    RETURN_VAL=$?
     474    if [ "$RETURN_VAL" -eq "1" ]; then
     475      # if it doesn't begin with a '/' and it exists when the pwd is
     476      # prepended to it then append the full path
     477      echo $opt | grep -e '^/' 2>/dev/null > /dev/null
     478      if [ "${RETURN_VAL}" -ne "0" ] && [ -e `pwd`/$opt ]; then
     479        opt="`pwd`/$opt"
     480      fi
     481      exec $MOZ_CLIENT_PROGRAM "openurl($opt)"
     482    fi
     483    exec $MOZ_CLIENT_PROGRAM "openurl($opt,new-window)"
     484  fi
     485  moz_run_program ${1+"$@"}
    435486fi
    436487
    437488exit $exitcode
  • security/coreconf/headers.mk

    diff -Nur mozilla.orig/security/coreconf/headers.mk mozilla/security/coreconf/headers.mk
    old new  
    5858endif
    5959
    6060MK_HEADERS = included
     61INCLUDES += -I$(DIST)/include/nspr -I$(DIST)/include/dbm
  • xpcom/reflect/xptcall/src/md/unix/xptcinvoke_unixish_x86.cpp

    diff -Nur mozilla.orig/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_unixish_x86.cpp mozilla/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_unixish_x86.cpp
    old new  
    4040#include "xptcprivate.h"
    4141#include "xptc_platforms_unixish_x86.h"
    4242
    43 extern "C" {
    44 
    45 static void
     43extern "C" void
    4644invoke_copy_to_stack(PRUint32 paramCount, nsXPTCVariant* s, PRUint32* d)
    4745{
    4846    for(PRUint32 i = paramCount; i >0; i--, d++, s++)
     
    7068    }
    7169}
    7270
    73 }
    74 
     71extern "C"
    7572XPTC_PUBLIC_API(nsresult)
    7673XPTC_InvokeByIndex(nsISupports* that, PRUint32 methodIndex,
    77                    PRUint32 paramCount, nsXPTCVariant* params)
    78 {
    79 #ifdef __GNUC__            /* Gnu compiler. */
    80   PRUint32 result;
    81   // Each param takes at most 2, 4-byte words
    82   // It doesn't matter if we push too many words, and calculating the exact
    83   // ammount takes time.
    84   PRUint32 n = paramCount << 3;
    85   void (*fn_copy) (unsigned int, nsXPTCVariant *, PRUint32 *) = invoke_copy_to_stack;
    86   int temp1, temp2, temp3;
    87  
    88  __asm__ __volatile__(
    89     "subl  %8, %%esp\n\t" /* make room for params */
    90     "pushl %%esp\n\t"
    91     "pushl %7\n\t"
    92     "pushl %6\n\t"
    93     "call  *%0\n\t"       /* copy params */
    94     "addl  $0xc, %%esp\n\t"
    95     "movl  %4, %%ecx\n\t"
     74                   PRUint32 paramCount, nsXPTCVariant* params);
     75
     76#ifdef __GNUC__                 /* GNU compiler */
     77asm(".section   \".text\"\n\t"
     78    ".align     2\n\t"
     79    ".globl     XPTC_InvokeByIndex\n\t"
     80    ".type      XPTC_InvokeByIndex,@function\n"
     81"XPTC_InvokeByIndex:\n\t"
     82    "pushl %ebp\n\t"
     83    "movl  %esp, %ebp\n\t"
     84    "pushl %ecx\n\t"
     85    "pushl %edx\n\t"
     86    "pushl %edi\n\t"
     87    "movl  0x10(%ebp), %ecx\n\t"        /* paramCount */
     88    "movl  0x14(%ebp), %edx\n\t"        /* params */
     89    // Each param takes at most 2, 4-byte words
     90    // It doesn't matter if we push too many words, and calculating the exact
     91    // ammount takes time.
     92    "leal  0(,%ecx,8), %edi\n\t"
     93    "subl  %edi, %esp\n\t"
     94    "pushl %esp\n\t"                    /* copy params */
     95    "pushl %edx\n\t"
     96    "pushl %ecx\n\t"
     97    "call  invoke_copy_to_stack\n\t"
     98    "addl  $12, %esp\n\t"
     99    "movl  0x08(%ebp), %ecx\n\t"        /* that */
     100    "movl  0x0c(%ebp), %eax\n\t"        /* methodIndex */
    96101#ifdef CFRONT_STYLE_THIS_ADJUST
    97     "movl  (%%ecx), %%edx\n\t"
    98     "movl  %5, %%eax\n\t"   /* function index */
    99     "shl   $3, %%eax\n\t"   /* *= 8 */
    100     "addl  $8, %%eax\n\t"   /* += 8 skip first entry */
    101     "addl  %%eax, %%edx\n\t"
    102     "movswl (%%edx), %%eax\n\t" /* 'this' offset */
    103     "addl  %%eax, %%ecx\n\t"
    104     "pushl %%ecx\n\t"
    105     "addl  $4, %%edx\n\t"   /* += 4, method pointer */
     102#error "FIXME: untested"
     103    "movl  (%ecx), %edx\n\t"
     104    "shl   $3, %eax\n\t"                /* *= 8 */
     105    "addl  $8, %eax\n\t"                /* += 8 skip first entry */
     106    "addl  %eax, %edx\n\t"
     107    "movswl (%edx), %eax\n\t"          /* 'this' offset */
     108    "addl  %eax, %ecx\n\t"
     109    "pushl %ecx\n\t"
     110    "addl  $4, %edx\n\t"                /* += 4, method pointer */
    106111#else /* THUNK_BASED_THIS_ADJUST */
    107     "pushl %%ecx\n\t"
    108     "movl  (%%ecx), %%edx\n\t"
    109     "movl  %5, %%eax\n\t"   /* function index */
     112    "pushl %ecx\n\t"
     113    "movl  (%ecx), %edx\n\t"
    110114#if defined(__GXX_ABI_VERSION) && __GXX_ABI_VERSION >= 100 /* G++ V3 ABI */
    111     "leal  (%%edx,%%eax,4), %%edx\n\t"
     115    "leal  0(%edx,%eax,4), %edx\n\t"
    112116#else /* not G++ V3 ABI  */
    113     "leal  8(%%edx,%%eax,4), %%edx\n\t"
     117    "leal  8(%edx,%eax,4), %edx\n\t"
    114118#endif /* G++ V3 ABI */
    115119#endif
    116     "call  *(%%edx)\n\t"    /* safe to not cleanup esp */
    117     "addl  $4, %%esp\n\t"
    118     "addl  %8, %%esp"
    119     : "=a" (result),        /* %0 */
    120       "=c" (temp1),         /* %1 */
    121       "=d" (temp2),         /* %2 */
    122       "=g" (temp3)          /* %3 */
    123     : "g" (that),           /* %4 */
    124       "g" (methodIndex),    /* %5 */
    125       "1" (paramCount),     /* %6 */
    126       "2" (params),         /* %7 */
    127       "g" (n),              /* %8 */
    128       "0" (fn_copy)         /* %3 */
    129     : "memory"
    130     );
    131    
    132   return result;
    133 
     120    "call  *(%edx)\n\t"
     121    "addl  $4, %esp\n\t"                /* reajust stack for "this" pointer */
     122    "addl  %edi, %esp\n\t"              /* ... and space for params */
     123    "popl  %edi\n\t"
     124    "popl  %edx\n\t"
     125    "popl  %ecx\n\t"
     126    "popl  %ebp\n\t"
     127    "ret"
     128);
    134129#else
    135130#error "can't find a compiler to use"
    136131#endif /* __GNUC__ */
    137 
    138 }   
  • xpcom/reflect/xptcall/src/md/unix/xptcstubs_unixish_x86.cpp

    diff -Nur mozilla.orig/xpcom/reflect/xptcall/src/md/unix/xptcstubs_unixish_x86.cpp mozilla/xpcom/reflect/xptcall/src/md/unix/xptcstubs_unixish_x86.cpp
    old new  
    4040#include "xptcprivate.h"
    4141#include "xptc_platforms_unixish_x86.h"
    4242
    43 static nsresult
     43extern "C" nsresult
    4444PrepareAndDispatch(nsXPTCStubBase* self, uint32 methodIndex, PRUint32* args)
    4545{
    4646#define PARAM_BUFFER_COUNT     16
     
    102102    return result;
    103103}
    104104
    105 #ifdef __GNUC__         /* Gnu Compiler. */
    106 #define STUB_ENTRY(n) \
    107 nsresult nsXPTCStubBase::Stub##n() \
    108 { \
    109   register nsresult (*method) (nsXPTCStubBase *, uint32, PRUint32 *) = PrepareAndDispatch; \
    110   int temp0, temp1; \
    111   register nsresult result; \
    112   __asm__ __volatile__( \
    113     "leal   0x0c(%%ebp), %%ecx\n\t"    /* args */ \
    114     "pushl  %%ecx\n\t" \
    115     "pushl  $"#n"\n\t"                 /* method index */ \
    116     "movl   0x08(%%ebp), %%ecx\n\t"    /* this */ \
    117     "pushl  %%ecx\n\t" \
    118     "call   *%%edx\n\t"                /* PrepareAndDispatch */ \
    119     "addl   $12, %%esp" \
    120     : "=a" (result),    /* %0 */ \
    121       "=&c" (temp0),    /* %1 */ \
    122       "=d" (temp1)      /* %2 */ \
    123     : "2" (method)      /* %2 */ \
    124     : "memory" ); \
    125     return result; \
    126 }
     105#ifndef __GNUC__
     106#error "can't find a compiler to use"
     107#endif
    127108
     109#if defined(__GXX_ABI_VERSION) && __GXX_ABI_VERSION >= 100 /* G++ V3 ABI */
     110// gcc3 mangling tends to insert the length of the method name
     111#define STUB_ENTRY(n)                                                   \
     112asm(".section   \".text\"\n\t"                                          \
     113    ".align     2\n\t"                                                  \
     114    ".if        " #n " < 10\n\t"                                        \
     115    ".globl     _ZN14nsXPTCStubBase5Stub" #n "Ev\n\t"                   \
     116    ".type      _ZN14nsXPTCStubBase5Stub" #n "Ev,@function\n"           \
     117"_ZN14nsXPTCStubBase5Stub" #n "Ev:\n\t"                                 \
     118                                                                        \
     119    ".elseif    " #n " < 100\n\t"                                       \
     120    ".globl     _ZN14nsXPTCStubBase6Stub" #n "Ev\n\t"                   \
     121    ".type      _ZN14nsXPTCStubBase6Stub" #n "Ev,@function\n"           \
     122"_ZN14nsXPTCStubBase6Stub" #n "Ev:\n\t"                                 \
     123                                                                        \
     124    ".elseif    " #n " < 1000\n\t"                                      \
     125    ".globl     _ZN14nsXPTCStubBase7Stub" #n "Ev\n\t"                   \
     126    ".type      _ZN14nsXPTCStubBase7Stub" #n "Ev,@function\n"           \
     127"_ZN14nsXPTCStubBase7Stub" #n "Ev:\n\t"                                 \
     128                                                                        \
     129    ".else\n\t"                                                         \
     130    ".err       \"stub number " #n " >= 1000 not yet supported\"\n\t"   \
     131    ".endif\n\t"                                                        \
     132                                                                        \
     133    "movl       $" #n ", %eax\n\t"                                      \
     134    "jmp        SharedStub"                                             \
     135);
    128136#else
    129 #error "can't find a compiler to use"
    130 #endif /* __GNUC__ */
     137// gcc2 version
     138#define STUB_ENTRY(n)                                           \
     139asm(".section   \".text\"\n\t"                                  \
     140    ".align     2\n\t"                                          \
     141    ".globl     Stub" #n "__14nsXPTCStubBase\n\t"               \
     142    ".type      Stub" #n "__14nsXPTCStubBase,@function\n"       \
     143"Stub" #n "__14nsXPTCStubBase:\n\t"                             \
     144    "movl       $" #n ", %eax\n\t"                              \
     145    "jmp        SharedStub\n\t"                                 \
     146);
     147#endif
     148
     149// static nsresult SharedStub(PRUint32 methodIndex) __attribute__((regparm(1)))
     150asm(".section   \".text\"\n\t"
     151    ".align     2\n\t"
     152    ".type      SharedStub,@function\n\t"
     153"SharedStub:\n\t"
     154    "pushl %ebp\n\t"
     155    "movl  %esp, %ebp\n\t"
     156    "leal  0x0c(%ebp), %ecx\n\t"
     157    "pushl %ecx\n\t"
     158    "pushl %eax\n\t"
     159    "movl  0x08(%ebp), %ecx\n\t"
     160    "pushl %ecx\n\t"
     161    "call  PrepareAndDispatch\n\t"
     162    "addl  $12, %esp\n\t"
     163    "popl  %ebp\n\t"
     164    "ret"
     165);
    131166
    132167#define SENTINEL_ENTRY(n) \
    133168nsresult nsXPTCStubBase::Sentinel##n() \
  • modules/libpref/src/unix/unix.js

    diff -Nur mozilla.orig/modules/libpref/src/unix/unix.js mozilla/modules/libpref/src/unix/unix.js
    old new  
    223223pref("font.scale.outline.min",      6);
    224224
    225225// TrueType
    226 pref("font.FreeType2.enable", false);
     226pref("font.FreeType2.enable", true);
    227227pref("font.freetype2.shared-library", "libfreetype.so.6");
    228228// if libfreetype was built without hinting compiled in
    229229// it is best to leave hinting off
    230230pref("font.FreeType2.autohinted", false);
    231 pref("font.FreeType2.unhinted", true);
     231pref("font.FreeType2.unhinted", false);
    232232// below a certian pixel size anti-aliased fonts produce poor results
    233233pref("font.antialias.min",        10);
    234234pref("font.embedded_bitmaps.max", 1000000);
    235235pref("font.scale.tt_bitmap.dark_text.min", 64);
    236236pref("font.scale.tt_bitmap.dark_text.gain", "0.8");
    237237// sample prefs for TrueType font dirs
    238 //pref("font.directory.truetype.1", "/u/sam/tt_font");
     238pref("font.directory.truetype.1", "/usr/X11R6/lib/X11/fonts/TTF");
    239239//pref("font.directory.truetype.2", "/u/sam/tt_font2");
    240240//pref("font.directory.truetype.3", "/u/sam/tt_font3");
    241241
  • other-licenses/freetype/include/freetype/config/ftoption.h

    diff -Nur mozilla.orig/other-licenses/freetype/include/freetype/config/ftoption.h mozilla/other-licenses/freetype/include/freetype/config/ftoption.h
    old new  
    375375  /* By undefining this, you will only compile the code necessary to load  */
    376376  /* TrueType glyphs without hinting.                                      */
    377377  /*                                                                       */
    378 #undef TT_CONFIG_OPTION_BYTECODE_INTERPRETER
     378#define TT_CONFIG_OPTION_BYTECODE_INTERPRETER
    379379
    380380
    381381  /*************************************************************************/
  • xpfe/bootstrap/nsAppRunner.cpp

    diff -Nur mozilla.orig/xpfe/bootstrap/nsAppRunner.cpp mozilla/xpfe/bootstrap/nsAppRunner.cpp
    old new  
    135135#include "jprof.h"
    136136#endif
    137137
     138// on x86 linux, the current builds of some popular plugins (notably
     139// flashplayer and real) expect a few builtin symbols from libgcc
     140// which were available in some older versions of gcc.  However,
     141// they're _NOT_ available in newer versions of gcc (eg 3.1), so if
     142// we want those plugin to work with a gcc-3.1 built binary, we need
     143// to provide these symbols.  MOZ_ENABLE_OLD_ABI_COMPAT_WRAPPERS defaults
     144// to true on x86 linux, and false everywhere else.
     145//
     146// The fact that the new and free operators are mismatched
     147// mirrors the way the original functions in egcs 1.1.2 worked.
     148
     149extern "C" {
     150
     151# ifndef HAVE___builtin_vec_new
     152  void *__builtin_vec_new(size_t aSize, const std::nothrow_t &aNoThrow) throw()
     153  {
     154    return ::operator new(aSize, aNoThrow);
     155  }
     156# endif
     157
     158# ifndef HAVE___builtin_vec_delete
     159  void __builtin_vec_delete(void *aPtr, const std::nothrow_t &) throw ()
     160  {
     161    if (aPtr) {
     162      free(aPtr);
     163    }
     164  }
     165# endif
     166
     167# ifndef HAVE__builtin_new
     168        void *__builtin_new(int aSize)
     169  {
     170    return malloc(aSize);
     171  }
     172# endif
     173
     174# ifndef HAVE__builtin_delete
     175        void __builtin_delete(void *aPtr)
     176  {
     177    free(aPtr);
     178  }
     179# endif
     180
     181# ifndef HAVE__pure_virtual
     182  void __pure_virtual(void) {
     183    extern void __cxa_pure_virtual(void);
     184
     185    __cxa_pure_virtual();
     186  }
     187# endif
     188}
    138189
    139190#ifdef _BUILD_STATIC_BIN
    140191#include "nsStaticComponent.h"
  • allmakefiles.sh

    diff -Nur mozilla.orig/allmakefiles.sh mozilla/allmakefiles.sh
    old new  
    10651065            extensions/pref/autoconfig/public/Makefile
    10661066            extensions/pref/autoconfig/src/Makefile
    10671067            " ;;
     1068        spellcheck ) MAKEFILES_extensions="$MAKEFILES_extensions
     1069            extensions/spellcheck/Makefile
     1070            extensions/spellcheck/idl/Makefile
     1071            extensions/spellcheck/myspell/Makefile
     1072            extensions/spellcheck/myspell/dictionaries/Makefile
     1073            extensions/spellcheck/src/Makefile
     1074            " ;;
    10681075        transformiix ) MAKEFILES_extensions="$MAKEFILES_extensions
    10691076            $MAKEFILES_transformiix"
    10701077            ;;
  • xpinstall/packager/packages-unix

    diff -Nur mozilla.orig/xpinstall/packager/packages-unix mozilla/xpinstall/packager/packages-unix
    old new  
    403403bin/defaults/pref/inspector.js
    404404bin/res/inspector/viewer-registry.rdf
    405405bin/res/inspector/search-registry.rdf
     406
     407[spellchecker]
     408bin/components/libmyspell.so
     409bin/components/libspellchecker.so
     410bin/components/spellchecker.xpt
     411bin/components/myspell/*