Bugzilla bug 126637: renamed "std" to "st" because "std" is the C++
authorwtc%netscape.com
Tue, 19 Mar 2002 04:57:07 +0000
changeset 2302 c9d87b9a7099f659684141ce7b477e6bc6496026
parent 2301 6a99541487dc8277f2686e40dea9fc73a0cfcecd
child 2303 0bb4a3e0699a614a6495673b15db94851cc5f344
push idunknown
push userunknown
push dateunknown
bugs126637
Bugzilla bug 126637: renamed "std" to "st" because "std" is the C++ namespace for the standard C library. Not being able to use "std" as a variable name in a C file is most likely a bug in the stlport 4.0 header files.
pr/src/misc/prtime.c
--- a/pr/src/misc/prtime.c
+++ b/pr/src/misc/prtime.c
@@ -769,94 +769,94 @@ PR_LocalTimeParameters(const PRExplodedT
  *
  *------------------------------------------------------------------------
  */
 
 PR_IMPLEMENT(PRTimeParameters)
 PR_USPacificTimeParameters(const PRExplodedTime *gmt)
 {
     PRTimeParameters retVal;
-    PRExplodedTime std;
+    PRExplodedTime st;
 
     /*
      * Based on geographic location and GMT, figure out offset of
      * standard time from GMT.  In this example implementation, we
      * assume the local time zone is US Pacific Time.
      */
 
     retVal.tp_gmt_offset = -8L * 3600L;
 
     /*
      * Make a copy of GMT.  Note that the tm_params field of this copy
      * is ignored.
      */
 
-    std.tm_usec = gmt->tm_usec;
-    std.tm_sec = gmt->tm_sec;
-    std.tm_min = gmt->tm_min;
-    std.tm_hour = gmt->tm_hour;
-    std.tm_mday = gmt->tm_mday;
-    std.tm_month = gmt->tm_month;
-    std.tm_year = gmt->tm_year;
-    std.tm_wday = gmt->tm_wday;
-    std.tm_yday = gmt->tm_yday;
+    st.tm_usec = gmt->tm_usec;
+    st.tm_sec = gmt->tm_sec;
+    st.tm_min = gmt->tm_min;
+    st.tm_hour = gmt->tm_hour;
+    st.tm_mday = gmt->tm_mday;
+    st.tm_month = gmt->tm_month;
+    st.tm_year = gmt->tm_year;
+    st.tm_wday = gmt->tm_wday;
+    st.tm_yday = gmt->tm_yday;
 
     /* Apply the offset to GMT to obtain the local standard time */
-    ApplySecOffset(&std, retVal.tp_gmt_offset);
+    ApplySecOffset(&st, retVal.tp_gmt_offset);
 
     /*
      * Apply the rules on standard time or GMT to obtain daylight saving
      * time offset.  In this implementation, we use the US DST rule.
      */
-    if (std.tm_month < 3) {
+    if (st.tm_month < 3) {
         retVal.tp_dst_offset = 0L;
-    } else if (std.tm_month == 3) {
-        if (std.tm_wday == 0) {
+    } else if (st.tm_month == 3) {
+        if (st.tm_wday == 0) {
             /* A Sunday */
-            if (std.tm_mday <= 7) {
+            if (st.tm_mday <= 7) {
                 /* First Sunday */
                 /* 01:59:59 PST -> 03:00:00 PDT */
-                if (std.tm_hour < 2) {
+                if (st.tm_hour < 2) {
                     retVal.tp_dst_offset = 0L;
                 } else {
                     retVal.tp_dst_offset = 3600L;
                 }
             } else {
                 /* Not first Sunday */
                 retVal.tp_dst_offset = 3600L;
             }
         } else {
             /* Not a Sunday.  See if before first Sunday or after */
-            if (std.tm_wday + 1 <= std.tm_mday) {
+            if (st.tm_wday + 1 <= st.tm_mday) {
                 /* After first Sunday */
                 retVal.tp_dst_offset = 3600L;
             } else {
                 /* Before first Sunday */
                 retVal.tp_dst_offset = 0L;
             } 
         }
-    } else if (std.tm_month < 9) {
+    } else if (st.tm_month < 9) {
         retVal.tp_dst_offset = 3600L;
-    } else if (std.tm_month == 9) {
-        if (std.tm_wday == 0) {
-            if (31 - std.tm_mday < 7) {
+    } else if (st.tm_month == 9) {
+        if (st.tm_wday == 0) {
+            if (31 - st.tm_mday < 7) {
                 /* Last Sunday */
                 /* 01:59:59 PDT -> 01:00:00 PST */
-                if (std.tm_hour < 1) {
+                if (st.tm_hour < 1) {
                     retVal.tp_dst_offset = 3600L;
                 } else {
                     retVal.tp_dst_offset = 0L;
                 }
             } else {
                 /* Not last Sunday */
                 retVal.tp_dst_offset = 3600L;
             }
         } else {
             /* See if before or after last Sunday */
-            if (7 - std.tm_wday <= 31 - std.tm_mday) {
+            if (7 - st.tm_wday <= 31 - st.tm_mday) {
                 /* before last Sunday */
                 retVal.tp_dst_offset = 3600L;
             } else {
                 retVal.tp_dst_offset = 0L;
             }
         }
     } else {
         retVal.tp_dst_offset = 0L;