mirror of
https://github.com/psycopg/psycopg2.git
synced 2024-11-26 10:53:44 +03:00
Added localtime_r for platforms not providing it.
This commit is contained in:
parent
a237209a5e
commit
a1ed1fb267
|
@ -1,5 +1,7 @@
|
||||||
2005-10-18 Federico Di Gregorio <fog@initd.org>
|
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
|
* psycopg/cursor_type.c: cursors now have a FixedOffsetTimezone
|
||||||
tzinfo_factory by default.
|
tzinfo_factory by default.
|
||||||
|
|
||||||
|
|
|
@ -71,6 +71,11 @@ static struct tm *gmtime_r(time_t *t, struct tm *tm)
|
||||||
tm = gmtime(t);
|
tm = gmtime(t);
|
||||||
return tm;
|
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 */
|
/* remove the inline keyword, since it doesn't work unless C++ file */
|
||||||
#define inline
|
#define inline
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -59,7 +59,6 @@ psyco_curs_close(cursorObject *self, PyObject *args)
|
||||||
return Py_None;
|
return Py_None;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* execute method - executes a query */
|
/* execute method - executes a query */
|
||||||
|
|
||||||
|
@ -537,7 +536,6 @@ psyco_curs_mogrify(cursorObject *self, PyObject *args, PyObject *kwargs)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* fetchone method - fetch one row of results */
|
/* fetchone method - fetch one row of results */
|
||||||
|
|
||||||
|
@ -682,7 +680,6 @@ psyco_curs_fetchone(cursorObject *self, PyObject *args)
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* fetch many - fetch some results */
|
/* fetch many - fetch some results */
|
||||||
|
|
||||||
|
@ -804,7 +801,6 @@ psyco_curs_fetchall(cursorObject *self, PyObject *args)
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* callproc method - execute a stored procedure */
|
/* callproc method - execute a stored procedure */
|
||||||
|
|
||||||
|
@ -874,7 +870,6 @@ psyco_curs_nextset(cursorObject *self, PyObject *args)
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* setinputsizes - predefine memory areas for execute (does nothing) */
|
/* setinputsizes - predefine memory areas for execute (does nothing) */
|
||||||
|
|
||||||
|
@ -896,7 +891,6 @@ psyco_curs_setinputsizes(cursorObject *self, PyObject *args)
|
||||||
return Py_None;
|
return Py_None;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* setoutputsize - predefine memory areas for execute (does nothing) */
|
/* setoutputsize - predefine memory areas for execute (does nothing) */
|
||||||
|
|
||||||
|
@ -918,7 +912,6 @@ psyco_curs_setoutputsize(cursorObject *self, PyObject *args)
|
||||||
return Py_None;
|
return Py_None;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* scroll - scroll position in result list */
|
/* scroll - scroll position in result list */
|
||||||
|
|
||||||
|
@ -962,7 +955,6 @@ psyco_curs_scroll(cursorObject *self, PyObject *args, PyObject *kwargs)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#ifdef PSYCOPG_EXTENSIONS
|
#ifdef PSYCOPG_EXTENSIONS
|
||||||
|
|
||||||
|
@ -1144,7 +1136,6 @@ psyco_curs_isready(cursorObject *self, PyObject *args)
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/** the cursor object **/
|
/** the cursor object **/
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user