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

Commitc024fa4

Browse files
committed
Remove use of __P so that <sys/cdefs.h> is not needed. Per suggestion
from Martin Renters.
1 parent1ccc245 commitc024fa4

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

‎src/port/qsort.c

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
/*
22
* Copied from NetBSD CVS, 2002-07-19, bjm
33
* Add do ... while() macro fix
4-
* Remove __inline, _DIAGASSERTs
4+
* Remove __inline, _DIAGASSERTs, __P
5+
*
6+
* $Header: /cvsroot/pgsql/src/port/qsort.c,v 1.2 2002/08/12 15:24:07 tgl Exp $
57
*/
68

79
/*$NetBSD: qsort.c,v 1.12 1999/09/20 04:39:40 lukem Exp $ */
@@ -39,18 +41,16 @@
3941
* SUCH DAMAGE.
4042
*/
4143

42-
#include<sys/cdefs.h>
44+
#include<stdlib.h>
45+
#include<errno.h>
4346
#include<sys/types.h>
4447

45-
#include<assert.h>
46-
#include<errno.h>
47-
#include<stdlib.h>
4848

49-
staticchar*med3__P((char*,char*,char*,
50-
int (*) (constvoid*,constvoid*)));
51-
staticvoidswapfunc__P((char*,char*,size_t,int));
49+
staticchar*med3 (char*,char*,char*,
50+
int (*) (constvoid*,constvoid*));
51+
staticvoidswapfunc(char*,char*,size_t,int);
5252

53-
#definemin(a,b)(a) < (b) ?a :b
53+
#definemin(a,b)((a) < (b) ?(a) :(b))
5454

5555
/*
5656
* Qsort routine from Bentley & McIlroy's "Engineering a Sort Function".
@@ -98,7 +98,7 @@ med3(a, b, c, cmp)
9898
char*a,
9999
*b,
100100
*c;
101-
int(*cmp)__P((constvoid*,constvoid*));
101+
int(*cmp)(constvoid*,constvoid*);
102102
{
103103
returncmp(a,b)<0 ?
104104
(cmp(b,c)<0 ?b : (cmp(a,c)<0 ?c :a))
@@ -110,7 +110,7 @@ qsort(a, n, es, cmp)
110110
void*a;
111111
size_tn,
112112
es;
113-
int(*cmp)__P((constvoid*,constvoid*));
113+
int(*cmp)(constvoid*,constvoid*);
114114
{
115115
char*pa,
116116
*pb,

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp