Patch from Sven Verdoolaege <skimo@breughel.ufsia.ac.be> for large_objects

This commit is contained in:
Marc G. Fournier 1997-03-18 21:30:41 +00:00
parent 812a6c2b54
commit dcd2332a4d
3 changed files with 18 additions and 6 deletions

View File

@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/libpq/be-fsstubs.c,v 1.5 1996/11/15 18:38:20 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/libpq/be-fsstubs.c,v 1.6 1997/03/18 21:29:21 scrappy Exp $
*
* NOTES
* This should be moved to a more appropriate place. It is here
@ -140,11 +140,21 @@ lo_write(int fd, char *buf, int len)
int
lo_lseek(int fd, int offset, int whence)
{
MemoryContext currentContext;
int ret;
if (fd >= MAX_LOBJ_FDS) {
elog(WARN,"lo_seek: large obj descriptor (%d) out of range", fd);
return -2;
}
return inv_seek(cookies[fd], offset, whence);
currentContext = MemoryContextSwitchTo((MemoryContext)fscxt);
ret = inv_seek(cookies[fd], offset, whence);
MemoryContextSwitchTo(currentContext);
return ret;
}
Oid

View File

@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/error/elog.c,v 1.13 1997/03/12 21:10:53 scrappy Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/error/elog.c,v 1.14 1997/03/18 21:30:39 scrappy Exp $
*
*-------------------------------------------------------------------------
*/
@ -50,7 +50,8 @@ elog(int lev, const char *fmt, ... )
#if !defined(BSD44_derived) && \
!defined(bsdi) && \
!defined(bsdi_2_1) && \
!defined(linuxalpha)
!defined(linuxalpha) && \
!defined(__GLIBC__)
extern char *sys_errlist[];
#endif /* bsd derived */
#ifndef PG_STANDALONE

View File

@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/error/Attic/exc.c,v 1.10 1997/03/12 21:10:56 scrappy Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/error/Attic/exc.c,v 1.11 1997/03/18 21:30:41 scrappy Exp $
*
* NOTE
* XXX this code needs improvement--check for state violations and
@ -96,7 +96,8 @@ ExcPrint(Exception *excP,
#if !defined(BSD44_derived) && \
!defined(bsdi) && \
!defined(bsdi_2_1) && \
!defined(linuxalpha)
!defined(linuxalpha) && \
!defined(__GLIBC__)
extern char *sys_errlist[];
#endif /* ! bsd_derived */