~ubuntu-branches/ubuntu/trusty/xulrunner/trusty

« back to all changes in this revision

Viewing changes to xulrunner/stub/nsXULStub.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Devid Antonio Filoni
  • Date: 2008-08-25 13:04:18 UTC
  • mfrom: (1.1.12 upstream)
  • Revision ID: james.westby@ubuntu.com-20080825130418-ck1i2ms384tzb9m0
Tags: 1.8.1.16+nobinonly-0ubuntu1
* New upstream release (taken from upstream CVS), LP: #254618.
* Fix MFSA 2008-35, MFSA 2008-34, MFSA 2008-33, MFSA 2008-32, MFSA 2008-31,
  MFSA 2008-30, MFSA 2008-29, MFSA 2008-28, MFSA 2008-27, MFSA 2008-25,
  MFSA 2008-24, MFSA 2008-23, MFSA 2008-22, MFSA 2008-21, MFSA 2008-26 also
  known as CVE-2008-2933, CVE-2008-2785, CVE-2008-2811, CVE-2008-2810,
  CVE-2008-2809, CVE-2008-2808, CVE-2008-2807, CVE-2008-2806, CVE-2008-2805,
  CVE-2008-2803, CVE-2008-2802, CVE-2008-2801, CVE-2008-2800, CVE-2008-2798.
* Drop 89_bz419350_attachment_306066 patch, merged upstream.
* Bump Standards-Version to 3.8.0.

Show diffs side-by-side

added added

removed removed

Lines of Context:
57
57
#define XULRUNNER_BIN "xulrunner-bin"
58
58
#endif
59
59
 
 
60
//Added code to include necessary BEOS header for BEOS specific code
 
61
#ifdef XP_BEOS
 
62
#include <Entry.h>
 
63
#include <Path.h>
 
64
#endif
 
65
 
60
66
#define VERSION_MAXLEN 128
61
67
 
62
68
int
72
78
  if (!::GetModuleFileName(NULL, iniPath, sizeof(iniPath)))
73
79
    return 1;
74
80
 
75
 
#else
 
81
//Added Beos specific code to get the Path
 
82
#elif defined ( XP_BEOS )
 
83
 
 
84
  BEntry e((const char *)argv[0], true);  // traverse symlink
 
85
  BPath p;
 
86
  status_t err;
 
87
  err = e.GetPath(&p);  
 
88
  NS_ASSERTION(err == B_OK, "realpath failed");
 
89
  
 
90
  if (err == B_OK)
 
91
    //p.Path returns a pointer, so use strcpy to store path in iniPath
 
92
    strcpy(iniPath, p.Path());
 
93
 
 
94
#else 
76
95
 
77
96
  // on unix, there is no official way to get the path of the current binary.
78
97
  // instead of using the MOZILLA_FIVE_HOME hack, which doesn't scale to
188
207
           "%s" XPCOM_FILE_PATH_SEPARATOR XULRUNNER_BIN, greDir);
189
208
 
190
209
#ifndef XP_WIN
 
210
#ifdef XP_BEOS
 
211
  putenv(strcat("XPCOM_SEARCH_KEY=", greDir));
 
212
#else
191
213
  setenv(XPCOM_SEARCH_KEY, greDir, 1);
192
214
#endif
 
215
#endif
 
216
 
193
217
 
194
218
  argv2[0] = xulBin;
195
219
  argv2[1] = iniPath;