Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit050371f

Browse files
committed
More cpu cleanups, only for 6.6.
1 parent540c114 commit050371f

File tree

9 files changed

+32
-27
lines changed

9 files changed

+32
-27
lines changed

‎src/backend/main/main.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,15 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/main/main.c,v 1.23 1999/02/1323:15:51 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/main/main.c,v 1.24 1999/07/1320:12:46 momjian Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
1414
#include<stdio.h>
1515
#include<string.h>
1616
#include<unistd.h>
1717

18-
#if defined(__alpha)&& !defined(linux)
18+
#if defined(__alpha__)&& !defined(linux)
1919
#include<sys/sysinfo.h>
2020
#include<machine/hal_sysinfo.h>
2121
#defineASSEMBLER
@@ -41,7 +41,7 @@ main(int argc, char *argv[])
4141
{
4242
intlen;
4343

44-
#if defined(__alpha)
44+
#if defined(__alpha__)
4545
#ifdefNOFIXADE
4646
intbuffer[]= {SSIN_UACPROC,UAC_SIGBUS};
4747

@@ -69,7 +69,7 @@ main(int argc, char *argv[])
6969
syscall(SYS_sysmips,MIPS_FIXADE,0,NULL,NULL,NULL);
7070
#endif
7171

72-
#if defined(__alpha)
72+
#if defined(__alpha__)
7373
if (setsysinfo(SSI_NVPAIRS,buffer,1, (caddr_t)NULL,
7474
(unsigned long)NULL)<0)
7575
elog(NOTICE,"setsysinfo failed: %d\n",errno);

‎src/backend/storage/buffer/s_lock.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/storage/buffer/Attic/s_lock.c,v 1.21 1999/06/06 20:19:35 vadim Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/storage/buffer/Attic/s_lock.c,v 1.22 1999/07/13 20:12:46 momjian Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -143,7 +143,7 @@ success:\n\
143143

144144
#endif/* __powerpc__ */
145145

146-
#if defined(__mips)
146+
#if defined(__mips__)
147147
staticvoid
148148
tas_dummy()
149149
{
@@ -165,7 +165,7 @@ fail:\n\
165165
");
166166
}
167167

168-
#endif/*__mips */
168+
#endif/*__mips__ */
169169

170170
#else/* defined(__GNUC__) */
171171
/***************************************************************************

‎src/backend/utils/adt/float.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/utils/adt/float.c,v 1.42 1999/05/25 16:12:02 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/utils/adt/float.c,v 1.43 1999/07/13 20:12:47 momjian Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -134,7 +134,7 @@ extern double rint(double x);
134134
* until the distributions are updated.
135135
*--djm 12/16/96
136136
*/
137-
#if ( defined(linux)&& defined(__alpha) )&& !defined(UNSAFE_FLOATS)
137+
#if ( defined(linux)&& defined(__alpha__) )&& !defined(UNSAFE_FLOATS)
138138
#defineUNSAFE_FLOATS
139139
#endif
140140

‎src/include/port/bsd.h

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -28,15 +28,16 @@
2828
#defineHAS_TEST_AND_SET
2929
#endif
3030

31-
#if defined(__powerpc__)
32-
#defineHAS_TEST_AND_SET
33-
typedefunsignedintslock_t;
34-
35-
#endif
3631
#if defined(__mips__)
3732
/* #undef HAS_TEST_AND_SET */
3833
#endif
39-
#if !defined(__powerpc__)
40-
typedefunsignedcharslock_t;
4134

35+
#if defined(__powerpc__)
36+
#defineHAS_TEST_AND_SET
37+
#endif
38+
39+
#if defined(__powerpc__)
40+
typedefunsignedintslock_t;
41+
#else
42+
typedefunsignedcharslock_t;
4243
#endif

‎src/include/port/bsdi.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
#if defined(__sparc__)
55
#defineNEED_SPARC_TAS_ASM
66
#endif
7+
78
#defineUSE_POSIX_TIME
89
#defineHAS_TEST_AND_SET
10+
911
typedefunsignedcharslock_t;

‎src/include/port/freebsd.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,5 @@
2727
#if defined(__mips__)
2828
/* #undef HAS_TEST_AND_SET */
2929
#endif
30+
3031
typedefunsignedcharslock_t;

‎src/include/port/linux.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,18 +8,18 @@
88
#defineUSE_POSIX_TIME
99
#defineHAS_TEST_AND_SET
1010

11-
#if defined(__powerpc__)
11+
#ifif defined(__i386__)
12+
typedefunsignedcharslock_t;
13+
14+
#elif defined(__powerpc__)
1215
typedefunsignedintslock_t;
1316

14-
#elif defined(__alpha)
17+
#elif defined(__alpha__)
1518
typedeflongintslock_t;
1619

17-
#elif defined(__mips)
20+
#elif defined(__mips__)
1821
typedefunsignedintslock_t;
1922

20-
#else/* i386 probably */
21-
typedefunsignedcharslock_t;
22-
2323
#endif
2424

2525
#if (__GLIBC__ >=2)

‎src/include/port/univel.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
#defineHAS_TEST_AND_SET
66
#defineNEED_I386_TAS_ASM
7+
78
/***************************************
89
* Define this if you are compiling with
910
* the native UNIXWARE C compiler.

‎src/include/storage/s_lock.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/include/storage/s_lock.h,v 1.62 1999/07/13 20:00:36 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/include/storage/s_lock.h,v 1.63 1999/07/13 20:12:51 momjian Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -78,7 +78,7 @@ extern void s_lock_sleep(unsigned spin);
7878
* All the gcc inlines
7979
*/
8080

81-
#if defined(__alpha)
81+
#if defined(__alpha__)
8282
#defineTAS(lock) tas(lock)
8383
#defineS_UNLOCK(lock) { __asm__("mb"); *(lock) = 0; }
8484

@@ -104,7 +104,7 @@ __asm__(" ldq $0, %0 \n\
104104
return (int)_res;
105105
}
106106

107-
#endif/*__alpha */
107+
#endif/*__alpha__ */
108108

109109

110110

@@ -226,7 +226,7 @@ tas(volatile slock_t *lock)
226226
* All non gcc
227227
*/
228228

229-
#if defined(__alpha)
229+
#if defined(__alpha__)
230230
/*
231231
* OSF/1 (Alpha AXP)
232232
*
@@ -237,7 +237,7 @@ tas(volatile slock_t *lock)
237237
#defineS_UNLOCK(lock)msem_unlock((lock), 0)
238238
#defineS_INIT_LOCK(lock)msem_init((lock), MSEM_UNLOCKED)
239239
#defineS_LOCK_FREE(lock)(!(lock)->msem_state)
240-
#endif/*__alpha */
240+
#endif/*__alpha__ */
241241

242242

243243

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp