File tree 7 files changed +97
-10
lines changed
7 files changed +97
-10
lines changed Original file line number Diff line number Diff line change 7
7
*
8
8
*
9
9
* IDENTIFICATION
10
- * $Header: /cvsroot/pgsql/src/backend/storage/ipc/Attic/s_lock.c,v 1.14 1997/06/06 01:37:14 scrappy Exp $
10
+ * $Header: /cvsroot/pgsql/src/backend/storage/ipc/Attic/s_lock.c,v 1.15 1997/07/29 14:07:48 momjian Exp $
11
11
*
12
12
*-------------------------------------------------------------------------
13
13
*/
@@ -521,5 +521,45 @@ S_INIT_LOCK(slock_t *lock)
521
521
522
522
#endif /* NEED_NS32K_TAS_ASM */
523
523
524
+ #if defined(linux ) && defined(PPC )
525
+
526
+ static int tas_dummy ()
527
+ {
528
+ __asm__("
529
+ tas : /* r3 points to the location of p */
530
+ lwarx 5 ,0 ,3 /* r5 = *p */
531
+ cmpwi 5 ,0 /* r5 == 0 ? */
532
+ bne fail /* if not 0, jump to fail */
533
+ addi 5 ,5 ,1 /* set 1 to r5 */
534
+ stwcx . 5 ,0 ,3 /* try update p atomically */
535
+ beq success /* jump if scceed */
536
+ fail : li 3 ,1 /* set 1 to r3 */
537
+ blr
538
+ success :
539
+ li 3 ,0 /* set 0 to r3 */
540
+ blr
541
+ ");
542
+ }
543
+
544
+ void
545
+ S_LOCK (slock_t * lock )
546
+ {
547
+ while (tas (lock ))
548
+ ;
549
+ }
550
+
551
+ void
552
+ S_UNLOCK (slock_t * lock )
553
+ {
554
+ * lock = 0 ;
555
+ }
556
+
557
+ void
558
+ S_INIT_LOCK (slock_t * lock )
559
+ {
560
+ S_UNLOCK (lock );
561
+ }
562
+
563
+ #endif /* defined(linux) && defined(PPC) */
524
564
525
565
#endif /* HAS_TEST_AND_SET */
Original file line number Diff line number Diff line change 7
7
*
8
8
*
9
9
* IDENTIFICATION
10
- * $Header: /cvsroot/pgsql/src/backend/utils/adt/Attic/dt.c,v 1.29 1997/07/24 20:15:53 momjian Exp $
10
+ * $Header: /cvsroot/pgsql/src/backend/utils/adt/Attic/dt.c,v 1.30 1997/07/29 14:07:54 momjian Exp $
11
11
*
12
12
*-------------------------------------------------------------------------
13
13
*/
@@ -3758,3 +3758,30 @@ printf( "EncodeTimeSpan- result is %s\n", str);
3758
3758
3759
3759
return 0 ;
3760
3760
} /* EncodeTimeSpan() */
3761
+
3762
+
3763
+ #if defined(linux ) && defined(PPC )
3764
+ int datetime_is_epoch (double j )
3765
+ {
3766
+ static union {
3767
+ double epoch ;
3768
+ unsigned char c [8 ];
3769
+ } u ;
3770
+
3771
+ u .c [0 ] = 0x80 ; /* sign bit */
3772
+ u .c [1 ] = 0x10 ; /* DBL_MIN */
3773
+
3774
+ return (j == u .epoch );
3775
+ }
3776
+ int datetime_is_current (double j )
3777
+ {
3778
+ static union {
3779
+ double current ;
3780
+ unsigned char c [8 ];
3781
+ } u ;
3782
+
3783
+ u .c [1 ] = 0x10 ; /* DBL_MIN */
3784
+
3785
+ return (j == u .current );
3786
+ }
3787
+ #endif
Original file line number Diff line number Diff line change 7
7
# define JMP_BUF
8
8
# define USE_POSIX_TIME
9
9
# define USE_POSIX_SIGNALS
10
- # if !defined(PPC )
11
- # define NEED_I386_TAS_ASM
12
- # define HAS_TEST_AND_SET
10
+ # define NEED_I386_TAS_ASM
11
+ # define HAS_TEST_AND_SET
12
+
13
+ # if defined(PPC )
14
+ typedef unsigned int slock_t ;
15
+ # else
13
16
typedef unsigned char slock_t ;
14
17
# endif
18
+
19
+ # if defined(PPC )
20
+ # undef NEED_I386_TAS_ASM
21
+ # undef HAVE_INT_TIMEZONE
22
+ # endif
23
+
15
24
# if defined(sparc )
16
25
# undef NEED_I386_TAS_ASM
17
26
# endif
Original file line number Diff line number Diff line change 8
8
*
9
9
* Copyright (c) 1994, Regents of the University of California
10
10
*
11
- * $Id: dt.h,v 1.13 1997/07/01 00:25:30 thomas Exp $
11
+ * $Id: dt.h,v 1.14 1997/07/29 14:08:21 momjian Exp $
12
12
*
13
13
*-------------------------------------------------------------------------
14
14
*/
@@ -215,10 +215,20 @@ typedef struct {
215
215
#define DATETIME_IS_NOEND (j ) (j == DT_NOEND)
216
216
217
217
#define DATETIME_CURRENT (j ) {j = DT_CURRENT;}
218
+ #if defined(linux ) && defined(PPC )
219
+ extern int datetime_is_current (double j );
220
+ #define DATETIME_IS_CURRENT (j ) datetime_is_current(j)
221
+ #else
218
222
#define DATETIME_IS_CURRENT (j ) (j == DT_CURRENT)
223
+ #endif
219
224
220
225
#define DATETIME_EPOCH (j ) {j = DT_EPOCH;}
226
+ #if defined(linux ) && defined(PPC )
227
+ extern int datetime_is_epoch (double j );
228
+ #define DATETIME_IS_EPOCH (j ) datetime_is_epoch(j)
229
+ #else
221
230
#define DATETIME_IS_EPOCH (j ) (j == DT_EPOCH)
231
+ #endif
222
232
223
233
#define DATETIME_IS_RELATIVE (j ) (DATETIME_IS_CURRENT(j) || DATETIME_IS_EPOCH(j))
224
234
#define DATETIME_NOT_FINITE (j ) (DATETIME_IS_INVALID(j) \
Original file line number Diff line number Diff line change 7
7
#
8
8
#
9
9
# IDENTIFICATION
10
- # $Header: /cvsroot/pgsql/src/interfaces/libpq/Makefile,v 1.35 1997/04/04 10:42 :34 scrappy Exp $
10
+ # $Header: /cvsroot/pgsql/src/interfaces/libpq/Makefile,v 1.36 1997/07/29 14:08 :34 momjian Exp $
11
11
#
12
12
# -------------------------------------------------------------------------
13
13
@@ -34,6 +34,7 @@ ifeq ($(PORTNAME), linux)
34
34
install-shlib-dep := install-shlib
35
35
shlib := libpq.so.1
36
36
LDFLAGS_SL = -shared
37
+ CFLAGS += $(CFLAGS_SL )
37
38
endif
38
39
endif
39
40
ifeq ($(PORTNAME ) , BSD44_derived)
Original file line number Diff line number Diff line change 1
1
ifdef LINUX_ELF
2
- LDFLAGS+= -rdynamic -Wl,-rpath -Wl,$(DESTDIR)$(LIBDIR)
2
+ LDFLAGS+= -export-dynamic -Wl,-rpath -Wl,$(DESTDIR)$(LIBDIR)
3
3
endif
4
4
MK_NO_LORDER= true
5
5
Original file line number Diff line number Diff line change 7
7
#
8
8
#
9
9
# IDENTIFICATION
10
- # $Header: /cvsroot/pgsql/src/test/regress/GNUmakefile,v 1.8 1997/06/06 01:35:57 scrappy Exp $
10
+ # $Header: /cvsroot/pgsql/src/test/regress/GNUmakefile,v 1.9 1997/07/29 14:09:11 momjian Exp $
11
11
#
12
12
# -------------------------------------------------------------------------
13
13
14
14
SRCDIR = ../..
15
15
include ../../Makefile.global
16
16
17
- CFLAGS+ = -I$(LIBPQDIR ) -I../../include
17
+ CFLAGS+ = -I$(LIBPQDIR ) -I../../include $( CFLAGS_SL )
18
18
19
19
LDADD+ = -L$(LIBPQDIR ) -lpq
20
20
You can’t perform that action at this time.
0 commit comments