Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Postgres FD Implementation
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abuhujair Javed
Postgres FD Implementation
Commits
8d25436d
Commit
8d25436d
authored
Jul 29, 1997
by
Bruce Momjian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mkLinux patches from Tatsuo Ishii.
parent
7c5afb87
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
97 additions
and
10 deletions
+97
-10
src/backend/storage/ipc/s_lock.c
src/backend/storage/ipc/s_lock.c
+41
-1
src/backend/utils/adt/dt.c
src/backend/utils/adt/dt.c
+28
-1
src/include/port/linux.h
src/include/port/linux.h
+12
-3
src/include/utils/dt.h
src/include/utils/dt.h
+11
-1
src/interfaces/libpq/Makefile
src/interfaces/libpq/Makefile
+2
-1
src/makefiles/Makefile.linux
src/makefiles/Makefile.linux
+1
-1
src/test/regress/GNUmakefile
src/test/regress/GNUmakefile
+2
-2
No files found.
src/backend/storage/ipc/s_lock.c
View file @
8d25436d
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/storage/ipc/Attic/s_lock.c,v 1.1
4 1997/06/06 01:37:14 scrappy
Exp $
* $Header: /cvsroot/pgsql/src/backend/storage/ipc/Attic/s_lock.c,v 1.1
5 1997/07/29 14:07:48 momjian
Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -521,5 +521,45 @@ S_INIT_LOCK(slock_t *lock)
...
@@ -521,5 +521,45 @@ S_INIT_LOCK(slock_t *lock)
#endif
/* NEED_NS32K_TAS_ASM */
#endif
/* NEED_NS32K_TAS_ASM */
#if defined(linux) && defined(PPC)
static
int
tas_dummy
()
{
__asm__
(
"
tas: /* r3 points to the location of p */
lwarx 5,0,3 /* r5 = *p */
cmpwi 5,0 /* r5 == 0 ? */
bne fail /* if not 0, jump to fail */
addi 5,5,1 /* set 1 to r5 */
stwcx. 5,0,3 /* try update p atomically */
beq success /* jump if scceed */
fail: li 3,1 /* set 1 to r3 */
blr
success:
li 3,0 /* set 0 to r3 */
blr
"
);
}
void
S_LOCK
(
slock_t
*
lock
)
{
while
(
tas
(
lock
))
;
}
void
S_UNLOCK
(
slock_t
*
lock
)
{
*
lock
=
0
;
}
void
S_INIT_LOCK
(
slock_t
*
lock
)
{
S_UNLOCK
(
lock
);
}
#endif
/* defined(linux) && defined(PPC) */
#endif
/* HAS_TEST_AND_SET */
#endif
/* HAS_TEST_AND_SET */
src/backend/utils/adt/dt.c
View file @
8d25436d
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/adt/Attic/dt.c,v 1.
29 1997/07/24 20:15:53
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/adt/Attic/dt.c,v 1.
30 1997/07/29 14:07:54
momjian Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -3758,3 +3758,30 @@ printf( "EncodeTimeSpan- result is %s\n", str);
...
@@ -3758,3 +3758,30 @@ printf( "EncodeTimeSpan- result is %s\n", str);
return
0
;
return
0
;
}
/* EncodeTimeSpan() */
}
/* EncodeTimeSpan() */
#if defined(linux) && defined(PPC)
int
datetime_is_epoch
(
double
j
)
{
static
union
{
double
epoch
;
unsigned
char
c
[
8
];
}
u
;
u
.
c
[
0
]
=
0x80
;
/* sign bit */
u
.
c
[
1
]
=
0x10
;
/* DBL_MIN */
return
(
j
==
u
.
epoch
);
}
int
datetime_is_current
(
double
j
)
{
static
union
{
double
current
;
unsigned
char
c
[
8
];
}
u
;
u
.
c
[
1
]
=
0x10
;
/* DBL_MIN */
return
(
j
==
u
.
current
);
}
#endif
src/include/port/linux.h
View file @
8d25436d
...
@@ -7,11 +7,20 @@
...
@@ -7,11 +7,20 @@
# define JMP_BUF
# define JMP_BUF
# define USE_POSIX_TIME
# define USE_POSIX_TIME
# define USE_POSIX_SIGNALS
# define USE_POSIX_SIGNALS
# if !defined(PPC)
# define NEED_I386_TAS_ASM
# define NEED_I386_TAS_ASM
# define HAS_TEST_AND_SET
# define HAS_TEST_AND_SET
# if defined(PPC)
typedef
unsigned
int
slock_t
;
# else
typedef
unsigned
char
slock_t
;
typedef
unsigned
char
slock_t
;
# endif
# endif
# if defined(PPC)
# undef NEED_I386_TAS_ASM
# undef HAVE_INT_TIMEZONE
# endif
# if defined(sparc)
# if defined(sparc)
# undef NEED_I386_TAS_ASM
# undef NEED_I386_TAS_ASM
# endif
# endif
src/include/utils/dt.h
View file @
8d25436d
...
@@ -8,7 +8,7 @@
...
@@ -8,7 +8,7 @@
*
*
* Copyright (c) 1994, Regents of the University of California
* Copyright (c) 1994, Regents of the University of California
*
*
* $Id: dt.h,v 1.1
3 1997/07/01 00:25:30 thomas
Exp $
* $Id: dt.h,v 1.1
4 1997/07/29 14:08:21 momjian
Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -215,10 +215,20 @@ typedef struct {
...
@@ -215,10 +215,20 @@ typedef struct {
#define DATETIME_IS_NOEND(j) (j == DT_NOEND)
#define DATETIME_IS_NOEND(j) (j == DT_NOEND)
#define DATETIME_CURRENT(j) {j = DT_CURRENT;}
#define DATETIME_CURRENT(j) {j = DT_CURRENT;}
#if defined(linux) && defined(PPC)
extern
int
datetime_is_current
(
double
j
);
#define DATETIME_IS_CURRENT(j) datetime_is_current(j)
#else
#define DATETIME_IS_CURRENT(j) (j == DT_CURRENT)
#define DATETIME_IS_CURRENT(j) (j == DT_CURRENT)
#endif
#define DATETIME_EPOCH(j) {j = DT_EPOCH;}
#define DATETIME_EPOCH(j) {j = DT_EPOCH;}
#if defined(linux) && defined(PPC)
extern
int
datetime_is_epoch
(
double
j
);
#define DATETIME_IS_EPOCH(j) datetime_is_epoch(j)
#else
#define DATETIME_IS_EPOCH(j) (j == DT_EPOCH)
#define DATETIME_IS_EPOCH(j) (j == DT_EPOCH)
#endif
#define DATETIME_IS_RELATIVE(j) (DATETIME_IS_CURRENT(j) || DATETIME_IS_EPOCH(j))
#define DATETIME_IS_RELATIVE(j) (DATETIME_IS_CURRENT(j) || DATETIME_IS_EPOCH(j))
#define DATETIME_NOT_FINITE(j) (DATETIME_IS_INVALID(j) \
#define DATETIME_NOT_FINITE(j) (DATETIME_IS_INVALID(j) \
...
...
src/interfaces/libpq/Makefile
View file @
8d25436d
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
#
#
#
#
# IDENTIFICATION
# IDENTIFICATION
# $Header: /cvsroot/pgsql/src/interfaces/libpq/Makefile,v 1.3
5 1997/04/04 10:42:34 scrappy
Exp $
# $Header: /cvsroot/pgsql/src/interfaces/libpq/Makefile,v 1.3
6 1997/07/29 14:08:34 momjian
Exp $
#
#
#-------------------------------------------------------------------------
#-------------------------------------------------------------------------
...
@@ -34,6 +34,7 @@ ifeq ($(PORTNAME), linux)
...
@@ -34,6 +34,7 @@ ifeq ($(PORTNAME), linux)
install-shlib-dep
:=
install-shlib
install-shlib-dep
:=
install-shlib
shlib
:=
libpq.so.1
shlib
:=
libpq.so.1
LDFLAGS_SL
=
-shared
LDFLAGS_SL
=
-shared
CFLAGS
+=
$(CFLAGS_SL)
endif
endif
endif
endif
ifeq
($(PORTNAME), BSD44_derived)
ifeq
($(PORTNAME), BSD44_derived)
...
...
src/makefiles/Makefile.linux
View file @
8d25436d
ifdef
LINUX_ELF
ifdef
LINUX_ELF
LDFLAGS
+=
-
r
dynamic
-Wl
,-rpath
-Wl
,
$(DESTDIR)$(LIBDIR)
LDFLAGS
+=
-
export-
dynamic
-Wl
,-rpath
-Wl
,
$(DESTDIR)$(LIBDIR)
endif
endif
MK_NO_LORDER
=
true
MK_NO_LORDER
=
true
...
...
src/test/regress/GNUmakefile
View file @
8d25436d
...
@@ -7,14 +7,14 @@
...
@@ -7,14 +7,14 @@
#
#
#
#
# IDENTIFICATION
# IDENTIFICATION
# $Header: /cvsroot/pgsql/src/test/regress/GNUmakefile,v 1.
8 1997/06/06 01:35:57 scrappy
Exp $
# $Header: /cvsroot/pgsql/src/test/regress/GNUmakefile,v 1.
9 1997/07/29 14:09:11 momjian
Exp $
#
#
#-------------------------------------------------------------------------
#-------------------------------------------------------------------------
SRCDIR
=
../..
SRCDIR
=
../..
include
../../Makefile.global
include
../../Makefile.global
CFLAGS
+=
-I
$(LIBPQDIR)
-I
../../include
CFLAGS
+=
-I
$(LIBPQDIR)
-I
../../include
$(CFLAGS_SL)
LDADD
+=
-L
$(LIBPQDIR)
-lpq
LDADD
+=
-L
$(LIBPQDIR)
-lpq
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment