summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog2
-rw-r--r--psycopg/config.h5
-rw-r--r--psycopg/cursor_type.c9
3 files changed, 7 insertions, 9 deletions
diff --git a/ChangeLog b/ChangeLog
index edd53b6..6b93fc1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,7 @@
2005-10-18 Federico Di Gregorio <fog@initd.org>
+ * psycopg/config.h: added fake localtime_r for platforms missing it
+
* psycopg/cursor_type.c: cursors now have a FixedOffsetTimezone
tzinfo_factory by default.
diff --git a/psycopg/config.h b/psycopg/config.h
index 2da5c3f..bed7041 100644
--- a/psycopg/config.h
+++ b/psycopg/config.h
@@ -71,6 +71,11 @@ static struct tm *gmtime_r(time_t *t, struct tm *tm)
tm = gmtime(t);
return tm;
}
+static struct tm *localtime_r(time_t *t, struct tm *tm)
+{
+ tm = localtime(t);
+ return tm;
+}
/* remove the inline keyword, since it doesn't work unless C++ file */
#define inline
#endif
diff --git a/psycopg/cursor_type.c b/psycopg/cursor_type.c
index 9de563d..64e43f0 100644
--- a/psycopg/cursor_type.c
+++ b/psycopg/cursor_type.c
@@ -59,7 +59,6 @@ psyco_curs_close(cursorObject *self, PyObject *args)
return Py_None;
}
-
/* execute method - executes a query */
@@ -537,7 +536,6 @@ psyco_curs_mogrify(cursorObject *self, PyObject *args, PyObject *kwargs)
}
#endif
-
/* fetchone method - fetch one row of results */
@@ -682,7 +680,6 @@ psyco_curs_fetchone(cursorObject *self, PyObject *args)
return res;
}
-
/* fetch many - fetch some results */
@@ -804,7 +801,6 @@ psyco_curs_fetchall(cursorObject *self, PyObject *args)
return list;
}
-
/* callproc method - execute a stored procedure */
@@ -874,7 +870,6 @@ psyco_curs_nextset(cursorObject *self, PyObject *args)
return NULL;
}
-
/* setinputsizes - predefine memory areas for execute (does nothing) */
@@ -896,7 +891,6 @@ psyco_curs_setinputsizes(cursorObject *self, PyObject *args)
return Py_None;
}
-
/* setoutputsize - predefine memory areas for execute (does nothing) */
@@ -918,7 +912,6 @@ psyco_curs_setoutputsize(cursorObject *self, PyObject *args)
return Py_None;
}
-
/* scroll - scroll position in result list */
@@ -962,7 +955,6 @@ psyco_curs_scroll(cursorObject *self, PyObject *args, PyObject *kwargs)
}
-
#ifdef PSYCOPG_EXTENSIONS
@@ -1144,7 +1136,6 @@ psyco_curs_isready(cursorObject *self, PyObject *args)
#endif
-
/** the cursor object **/