Changeset: fa32c91d9063 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=fa32c91d9063
Modified Files:
        monetdb5/modules/atoms/mtime.c
        monetdb5/modules/atoms/mtime.h
Branch: headless
Log Message:

Fixing the compilation issues


diffs (truncated from 643 to 300 lines):

diff --git a/monetdb5/modules/atoms/mtime.c b/monetdb5/modules/atoms/mtime.c
--- a/monetdb5/modules/atoms/mtime.c
+++ b/monetdb5/modules/atoms/mtime.c
@@ -1435,10 +1435,10 @@
        fromdate((int) v, &dummy, &dummy, &year);
        dayofweek = date_dayofweek(year_jan_1 = todate(1, 1, year));
 
-       if (dayofweek <= 4) {
+       if (dayofweek <= 4) 
                /* week of jan 1 belongs to this year */
                return (int) (1 + (v - year_jan_1 + dayofweek - 1) / 7);
-       if (v - year_jan_1 > 7 - dayofweek) {
+       if (v - year_jan_1 > 7 - dayofweek) 
                /* week of jan 1 belongs to last year; but this is a later week 
*/
                return (int) ((v - year_jan_1 + dayofweek - 1) / 7);
        /* recurse to get last weekno of previous year (it is 52 or 53) */
@@ -1462,8 +1462,8 @@
        int ret;
        if (v == daytime_nil)
                return int_nil;
-       fromtime((int) *v, &ret, &dummy, &dummy, &dummy);
-       return ret
+       fromtime((int) v, &ret, &dummy, &dummy, &dummy);
+       return ret;
 }
 
 /* extracts minutes from daytime (value between 0 and 59) */
@@ -1473,7 +1473,7 @@
        int ret;
        if ( v == daytime_nil)
                return int_nil;
-       fromtime((int) *v, &dummy, &ret, &dummy, &dummy);
+       fromtime((int) v, &dummy, &ret, &dummy, &dummy);
        return ret;
 }
 
@@ -1484,7 +1484,7 @@
        int ret;
        if (v == daytime_nil)
                return int_nil;
-       fromtime((int) *v, &dummy, &dummy, &ret, &dummy);
+       fromtime((int) v, &dummy, &dummy, &ret, &dummy);
        return ret;
 }
 
@@ -1511,7 +1511,7 @@
        return ret;
 }
 
-static inline int
+inline int
 daytime_add(daytime *ret, daytime *v, lng *msec)
 {
        if (*v == daytime_nil) {
@@ -1523,7 +1523,7 @@
 }
 
 /* extracts daytime from timestamp */
-static inline int
+inline int
 timestamp_extract_daytime(daytime *ret, timestamp *t, tzone *z)
 {
        if (ts_isnil(*t) || tz_isnil(*z)) {
@@ -1545,14 +1545,14 @@
        return GDK_SUCCEED;
 }
 
-static inline int
+inline int
 timestamp_extract_daytime_default(daytime *ret, timestamp *t)
 {
        return timestamp_extract_daytime(ret, t, &tzone_local);
 }
 
 /* extracts date from timestamp */
-static inline int
+inline int
 timestamp_extract_date(date *ret, timestamp *t, tzone *z)
 {
        if (ts_isnil(*t) || tz_isnil(*z)) {
@@ -1574,16 +1574,16 @@
        return GDK_SUCCEED;
 }
 
-static inline int
+inline int
 timestamp_extract_date_default(date *ret, timestamp *t)
 {
        return timestamp_extract_date(ret, t, &tzone_local);
 }
 
-static inline int date_adddays(date *ret, date *v, int *delta);
+inline int date_adddays(date *ret, date *v, int *delta);
 
 /* returns the date that comes a number of years after 'v' (or before iff 
*delta < 0). */
-static inline int
+inline int
 date_addyears(date *ret, date *v, int *delta)
 {
        if (*v == date_nil || *delta == int_nil) {
@@ -1613,7 +1613,7 @@
 }
 
 /* returns the date that comes a number of months after 'v' (or before iff 
*delta < 0). */
-static inline int
+inline int
 date_addmonths(date *ret, date *v, int *delta)
 {
        if (*v == date_nil || *delta == int_nil) {
@@ -1642,7 +1642,7 @@
 }
 
 /* returns the date that comes a number of day after 'v' (or before iff *delta 
< 0). */
-static inline int
+inline int
 date_adddays(date *ret, date *v, int *delta)
 {
        lng min = DATE_MIN, max = DATE_MAX;
@@ -1660,7 +1660,7 @@
 
 
 /* returns the number of days between 'val1' and 'val2'. */
-static inline int
+inline int
 date_diff(int *ret, date *v1, date *v2)
 {
        if (*v1 == date_nil || *v2 == date_nil) {
@@ -1672,7 +1672,7 @@
 }
 
 /* returns the timestamp that comes 'milliseconds' after 'value'. */
-static inline int
+inline int
 timestamp_add(timestamp *ret, timestamp *v, lng *msecs)
 {
        if (!ts_isnil(*v) && *msecs != lng_nil) {
@@ -1714,7 +1714,7 @@
 
 
 /* return whether DST holds in the tzone at a certain point of time. */
-static inline int
+inline int
 timestamp_inside_dst(bit *ret, timestamp *p, tzone *z)
 {
        *ret = FALSE;
@@ -1732,7 +1732,7 @@
 }
 
 /* create a DST start/end date rule. */
-static inline int
+inline int
 rule_create(rule *ret, int *month, int *day, int *weekday, int *minutes)
 {
        ret->asint = int_nil;
@@ -1746,7 +1746,7 @@
 }
 
 /* create a tzone as a simple hour difference from GMT. */
-static inline int
+inline int
 tzone_create_dst(tzone *ret, int *minutes, rule *start, rule *end)
 {
        *ret = *tzone_nil;
@@ -1760,7 +1760,7 @@
 }
 
 /* create a tzone as an hour difference from GMT and a DST. */
-static inline int
+inline int
 tzone_create(tzone *ret, int *minutes)
 {
        *ret = *tzone_nil;
@@ -1772,7 +1772,7 @@
 }
 
 /* extract month from rule. */
-static inline int
+inline int
 rule_extract_month(int *ret, rule *r)
 {
        *ret = (r->asint == int_nil) ? int_nil : r->s.month;
@@ -1780,7 +1780,7 @@
 }
 
 /* extract day from rule. */
-static inline int
+inline int
 rule_extract_day(int *ret, rule *r)
 {
        *ret = (r->asint == int_nil) ? int_nil : r->s.day - DAY_ZERO;
@@ -1788,7 +1788,7 @@
 }
 
 /* extract weekday from rule. */
-static inline int
+inline int
 rule_extract_weekday(int *ret, rule *r)
 {
        *ret = (r->asint == int_nil) ? int_nil : r->s.weekday - WEEKDAY_ZERO;
@@ -1796,7 +1796,7 @@
 }
 
 /* extract minutes from rule. */
-static inline int
+inline int
 rule_extract_minutes(int *ret, rule *r)
 {
        *ret = (r->asint == int_nil) ? int_nil : r->s.minutes;
@@ -1804,7 +1804,7 @@
 }
 
 /* extract rule that determines start of DST from tzone. */
-static inline int
+inline int
 tzone_extract_start(rule *ret, tzone *t)
 {
        if (tz_isnil(*t) || !t->dst) {
@@ -1816,7 +1816,7 @@
 }
 
 /* extract rule that determines end of DST from tzone. */
-static inline int
+inline int
 tzone_extract_end(rule *ret, tzone *t)
 {
        if (tz_isnil(*t) || !t->dst) {
@@ -1828,14 +1828,14 @@
 }
 
 /* extract number of minutes that tzone is offset wrt GMT. */
-static inline int
+inline int
 tzone_extract_minutes(int *ret, tzone *t)
 {
        *ret = (tz_isnil(*t)) ? int_nil : get_offset(t);
        return GDK_SUCCEED;
 }
 
-static inline int
+inline int
 date_sub_sec_interval_wrap(date *ret, date *t, int *sec)
 {
        if (*sec > 0) {
@@ -1846,7 +1846,7 @@
 
        return GDK_SUCCEED;
 }
-static inline int
+inline int
 date_sub_sec_interval_lng_wrap(date *ret, date *t, lng *sec)
 {
        if (*sec > 0) {
@@ -1858,7 +1858,7 @@
        return GDK_SUCCEED;
 }
 
-static inline int
+inline int
 date_add_sec_interval_wrap(date *ret, date *t, int *sec)
 {
        if (*sec > 0) {
@@ -1869,7 +1869,7 @@
 
        return GDK_SUCCEED;
 }
-static inline int
+inline int
 date_add_sec_interval_lng_wrap(date *ret, date *t, lng *sec)
 {
        if (*sec > 0) {
@@ -1881,14 +1881,14 @@
        return GDK_SUCCEED;
 }
 
-static inline int
+inline int
 date_sub_month_interval_wrap(date *ret, date *t, int *months)
 {
        return date_addmonths(ret, t, months);
 }
 
 /* compute the date from a rule in a certain year. */
-static inline int
+inline int
 compute_rule_foryear(date *ret, rule *val, int *year)
 {
        if (*(int *) val == int_nil || *year < YEAR_MIN || *year > YEAR_MAX) {
@@ -1900,7 +1900,7 @@
 }
 
 /* Mx macro expansions */
-static inline int date_comp_EQ(bit *retval, date *val1, date *val2)
+inline int date_comp_EQ(bit *retval, date *val1, date *val2)
 {
        if (*val1 == date_nil || *val2 == date_nil)
                *retval = bit_nil;
@@ -1909,7 +1909,7 @@
        return GDK_SUCCEED;
 }
 
_______________________________________________
Checkin-list mailing list
[email protected]
http://mail.monetdb.org/mailman/listinfo/checkin-list

Reply via email to