public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r13-2025] testsuite: fd-4.c redefines mode_t on AIX.
@ 2022-08-11 21:41 David Edelsohn
  0 siblings, 0 replies; only message in thread
From: David Edelsohn @ 2022-08-11 21:41 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:b2ee7d10302050aa9abd25f3feee69f24134012e

commit r13-2025-gb2ee7d10302050aa9abd25f3feee69f24134012e
Author: David Edelsohn <dje.gcc@gmail.com>
Date:   Thu Aug 11 16:26:37 2022 -0400

    testsuite: fd-4.c redefines mode_t on AIX.
    
    AIX stdio.h includes sys/types.h, which defines mode_t.  The
    analyzer/fd-4.c testcase provides a definition of mode_t for creat()
    call, which conflicts with the AIX definition.  This patch defines an
    AIX macro to prevent multiple-definition of the type.
    
    gcc/testsuite/ChangeLog:
    
            * gcc.dg/analyzer/fd-4.c: Define _MODE_T on AIX.

Diff:
---
 gcc/testsuite/gcc.dg/analyzer/fd-4.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/gcc/testsuite/gcc.dg/analyzer/fd-4.c b/gcc/testsuite/gcc.dg/analyzer/fd-4.c
index 6b8fca5408f..842a26b4364 100644
--- a/gcc/testsuite/gcc.dg/analyzer/fd-4.c
+++ b/gcc/testsuite/gcc.dg/analyzer/fd-4.c
@@ -1,3 +1,6 @@
+#ifdef _AIX
+#define _MODE_T
+#endif
 #include <stdio.h>
 
 int open(const char *, int mode);


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-08-11 21:41 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-11 21:41 [gcc r13-2025] testsuite: fd-4.c redefines mode_t on AIX David Edelsohn

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).