OSSP CVS Repository

ossp - Check-in [5535]
Not logged in
[Honeypot]  [Browse]  [Home]  [Login]  [Reports
[Search]  [Ticket]  [Timeline
  [Patchset]  [Tagging/Branching

Check-in Number: 5535
Date: 2006-Jul-29 11:08:15 (local)
2006-Jul-29 09:08:15 (UTC)
User:rse
Branch:
Comment: Increase portability by gracefully downgrading the stat(2) use of st_birthtime to st_birthtimensec or even st_mtime.
Tickets:
#110 Can't install on OS X
#111 unable to build ossp js with file object
#112 Build problem (st_birthtime in struct stat)
Inspections:
Files:
ossp-pkg/js/ChangeLog      added-> 1.11
ossp-pkg/js/THANKS      added-> 1.1
ossp-pkg/js/configure.ac      1.14 -> 1.15     2 inserted, 0 deleted
ossp-pkg/js/src/jsfile.c      1.7 -> 1.8     12 inserted, 0 deleted

ossp-pkg/js/ChangeLog -> 1.11

*** /dev/null    Mon Apr 29 06:22:13 2024
--- -    Mon Apr 29 06:24:11 2024
***************
*** 0 ****
--- 1,74 ----
+    _        ___  ____ ____  ____     _      
+   |_|_ _   / _ \/ ___/ ___||  _ \   (_)___  
+   _|_||_| | | | \___ \___ \| |_) |  | / __| 
+  |_||_|_| | |_| |___) |__) |  __/   | \__ \ 
+   |_|_|_|  \___/|____/____/|_|     _/ |___/ 
+                                   |__/      
+ 
+   OSSP js - Mozilla JavaScript Engine
+ 
+   CHANGELOG
+ 
+   This is a list of all changes to OSSP js.
+ 
+   Changes between 1.6.20060724 and 1.6.20060728 (2006-07-24 to 2006-07-28)
+ 
+    o Increase portability by gracefully downgrading the stat(2) use of
+      st_birthtime to st_birthtimensec or even st_mtime.
+      [Ralf S. Engelschall <rse@engelschall.com>,  Andrew Vajoczki <vajoczki@rogers.com>]
+ 
+    o Apply a few more upstream fixes to jsfile.c.
+      [Ralf S. Engelschall <rse@engelschall.com>]
+ 
+   Changes between 1.6.20060722 and 1.6.20060724 (2006-07-22 to 2006-07-24)
+ 
+    o Apply multiple code cleanups and bugfixes.
+      [Ralf S. Engelschall <rse@engelschall.com>]
+ 
+    o Move definitions of XP_UNIX and EXPORT_JS_API back from jstypes.h
+      to configure.ac (and this way the command-line) to not break the
+      use of jstypes.h as a regular API header in JS based applications.
+      [Ralf S. Engelschall <rse@engelschall.com>]
+ 
+    o Consistently mark all OSSP bugfixes with a "/* BUGFIX */" tag on
+      the "#ifdef OSSP" line. This way one can more easily see what
+      are specific OSSP specific changes what should be taken over by
+      upstream vendor.
+      [Ralf S. Engelschall <rse@engelschall.com>]
+ 
+    o Fix an incorrect argument type bug in jsfile.c related to a call to
+      js_InflateString(). A "size_t *" has to be passed, not a "size_t".
+      [Ralf S. Engelschall <rse@engelschall.com>]
+ 
+    o Upgrade from (the Mozilla Firefox 1.5 pinned version) SpiderMonkey
+      1.6.20060722 to the (SPIDERMONKEY_1_6_0_BRANCH based) 1.6.20060724
+      upstream version.
+      [Ralf S. Engelschall <rse@engelschall.com>]
+ 
+    o Added jslint (see http://www.jslint.com/) together with some
+      home-brewn option parser. The result is installed as
+      a stand-alone "jslint" program.
+      [Ralf S. Engelschall <rse@engelschall.com>]
+ 
+    o Install all src/js*.h headers during "make install" to allow
+      applications to at least optionally poke around in the internals.
+      This also allows an application to call js_InitFileClass() from
+      <jsfile.h> without us having to really call this function in the
+      standard API function JS_InitStandardClasses().
+      [Ralf S. Engelschall <rse@engelschall.com>]
+ 
+    o Change the default of the --with-file/--without from --without-file
+      to --with-file (enable the File object by default), but activate
+      it only in the CLI (where it doesn't hurt and where it is actually
+      really required to get something useful running there in practice)
+      but explicitly _NOT_ in JS_InitStandardClasses() (as this is
+      what would hurt the security in applications which assume that
+      JS_InitStandardClasses() initialized only really the standard
+      classes).
+      [Ralf S. Engelschall <rse@engelschall.com>]
+ 
+   Changes between *GENESIS* and 1.6.20060722 (2006-06-XX to 2006-07-22)
+    
+    o Initial OSSP js distribution of Mozilla JavaScript 1.6 as of 2006-07-22.
+      [Ralf S. Engelschall <rse@engelschall.com>]
+ 


ossp-pkg/js/THANKS -> 1.1

*** /dev/null    Mon Apr 29 06:22:13 2024
--- -    Mon Apr 29 06:24:11 2024
***************
*** 0 ****
--- 1,17 ----
+    _        ___  ____ ____  ____     _      
+   |_|_ _   / _ \/ ___/ ___||  _ \   (_)___  
+   _|_||_| | | | \___ \___ \| |_) |  | / __| 
+  |_||_|_| | |_| |___) |__) |  __/   | \__ \ 
+   |_|_|_|  \___/|____/____/|_|     _/ |___/ 
+                                   |__/      
+ 
+   OSSP js - Mozilla JavaScript Engine
+ 
+   THANKS
+ 
+   Credit has to be given to the following people who contributed ideas,
+   bugfixes, hints, gave platform feedback, etc. (in alphabetical order):
+ 
+     o  Thomas Lotterer             <thomas@lotterer.net>
+     o  Andrew Vajoczki             <vajoczki@rogers.com>
+ 


ossp-pkg/js/configure.ac 1.14 -> 1.15

--- configure.ac 2006/07/24 19:21:49     1.14
+++ configure.ac 2006/07/29 09:08:15     1.15
@@ -45,6 +45,8 @@
 AC_CHECK_LIB(socket, accept)
 AC_CHECK_LIB(m, floor)
 
+AC_CHECK_MEMBERS([struct stat.st_birthtime, struct stat.st_birthtimensec],,, [#include <sys/stat.h>])
+
 CPPFLAGS="$CPPFLAGS -DOSSP -DXP_UNIX -DEXPORT_JS_API"
 
 dnl #   configure option --with-version


ossp-pkg/js/src/jsfile.c 1.7 -> 1.8

--- jsfile.c     2006/07/26 07:15:59     1.7
+++ jsfile.c     2006/07/29 09:08:15     1.8
@@ -43,6 +43,10 @@
  */
 #if JS_HAS_FILE_OBJECT
 
+#ifdef OSSP
+#include "../config.h"
+#endif
+
 #include "jsstddef.h"
 
 /* ----------------- Platform-specific includes and defines ----------------- */
@@ -2696,7 +2700,15 @@
             goto out;
         }
 
+#if defined(HAVE_STRUCT_STAT_ST_BIRTHTIME)
         t = (time_t)(info.st_birthtime);
+#elif defined(HAVE_STRUCT_STAT_ST_BIRTHTIMENSEC)
+        t = (time_t)(info.st_birthtimensec / (1000*1000*1000));
+#else
+        /* not really correct, but the only possible fallback on not
+           fully POSIX compliant platforms. */
+        t = (time_t)(info.st_mtime);
+#endif
         tm = localtime(&t);
         *vp = OBJECT_TO_JSVAL(js_NewDateObject(cx, tm->tm_year + 1900,
                                     tm->tm_mon + 1,

CVSTrac 2.0.1