Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 0648d78

Browse files
committed
Make inclusion logic for sys/sem.h and sys/ipc.h consistent across all
the files that need them. Per trouble report from Teodor.
1 parent 6d18c03 commit 0648d78

File tree

3 files changed

+17
-22
lines changed

3 files changed

+17
-22
lines changed

src/backend/storage/ipc/ipc.c

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $Header: /cvsroot/pgsql/src/backend/storage/ipc/ipc.c,v 1.69 2001/09/29 04:02:23 tgl Exp $
11+
* $Header: /cvsroot/pgsql/src/backend/storage/ipc/ipc.c,v 1.70 2001/10/01 18:16:26 tgl Exp $
1212
*
1313
* NOTES
1414
*
@@ -27,11 +27,10 @@
2727
*/
2828
#include "postgres.h"
2929

30-
#include <sys/types.h>
31-
#include <sys/file.h>
3230
#include <errno.h>
3331
#include <signal.h>
3432
#include <unistd.h>
33+
#include <sys/file.h>
3534

3635
#include "storage/ipc.h"
3736
/* In Ultrix, sem.h and shm.h must be included AFTER ipc.h */
@@ -45,10 +44,6 @@
4544
#include <kernel/OS.h>
4645
#endif
4746

48-
#if defined(solaris_sparc)
49-
#include <sys/ipc.h>
50-
#endif
51-
5247
#if defined(__darwin__)
5348
#include "port/darwin/sem.h"
5449
#endif

src/backend/storage/lmgr/proc.c

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $Header: /cvsroot/pgsql/src/backend/storage/lmgr/proc.c,v 1.111 2001/09/30 00:45:47 momjian Exp $
11+
* $Header: /cvsroot/pgsql/src/backend/storage/lmgr/proc.c,v 1.112 2001/10/01 18:16:32 tgl Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -47,27 +47,21 @@
4747
#include "postgres.h"
4848

4949
#include <errno.h>
50-
#include <sys/time.h>
51-
#include <unistd.h>
5250
#include <signal.h>
53-
#include <sys/types.h>
51+
#include <unistd.h>
52+
#include <sys/time.h>
5453

55-
#if defined(solaris_sparc) || defined(__CYGWIN__)
56-
#include <sys/ipc.h>
54+
#include "storage/ipc.h"
55+
/* In Ultrix, sem.h and shm.h must be included AFTER ipc.h */
56+
#ifdef HAVE_SYS_SEM_H
5757
#include <sys/sem.h>
5858
#endif
5959

60-
#include "miscadmin.h"
61-
6260
#if defined(__darwin__)
6361
#include "port/darwin/sem.h"
6462
#endif
6563

66-
/* In Ultrix and QNX, sem.h must be included after ipc.h */
67-
#ifdef HAVE_SYS_SEM_H
68-
#include <sys/sem.h>
69-
#endif
70-
64+
#include "miscadmin.h"
7165
#include "access/xact.h"
7266
#include "storage/proc.h"
7367
#include "storage/sinval.h"

src/backend/storage/lmgr/spin.c

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,18 +15,24 @@
1515
*
1616
*
1717
* IDENTIFICATION
18-
* $Header: /cvsroot/pgsql/src/backend/storage/lmgr/spin.c,v 1.3 2001/10/01 17:52:34 momjian Exp $
18+
* $Header: /cvsroot/pgsql/src/backend/storage/lmgr/spin.c,v 1.4 2001/10/01 18:16:35 tgl Exp $
1919
*
2020
*-------------------------------------------------------------------------
2121
*/
2222
#include "postgres.h"
2323

2424
#include <errno.h>
25+
26+
#include "storage/ipc.h"
27+
/* In Ultrix, sem.h and shm.h must be included AFTER ipc.h */
2528
#ifdef HAVE_SYS_SEM_H
26-
#include <sys/types.h>
2729
#include <sys/sem.h>
2830
#endif
2931

32+
#if defined(__darwin__)
33+
#include "port/darwin/sem.h"
34+
#endif
35+
3036
#include "storage/lwlock.h"
3137
#include "storage/proc.h"
3238
#include "storage/spin.h"

0 commit comments

Comments
 (0)