From 8a0dd1b1a9d3f91bafb42c2a35c155b94068ef83 Mon Sep 17 00:00:00 2001 From: Geoffrey Keating Date: Tue, 28 Nov 2000 19:31:16 +0000 Subject: [PATCH] gen-params: Put in cases for O_EXCL, O_APPEND not being defined. 2000-11-28 Geoffrey Keating Felix Lee * gen-params: Put in cases for O_EXCL, O_APPEND not being defined. Co-Authored-By: Felix Lee From-SVN: r37821 --- libio/ChangeLog | 5 +++++ libio/gen-params | 36 +++++++++++++++++++++++++++++++++++- 2 files changed, 40 insertions(+), 1 deletion(-) diff --git a/libio/ChangeLog b/libio/ChangeLog index 5c9836ee7b02..ec2fd437739a 100644 --- a/libio/ChangeLog +++ b/libio/ChangeLog @@ -1,3 +1,8 @@ +2000-11-28 Geoffrey Keating + Felix Lee + + * gen-params: Put in cases for O_EXCL, O_APPEND not being defined. + 2000-10-18 Jakub Jelinek * iostream.cc (ends): Release the acquired lock. diff --git a/libio/gen-params b/libio/gen-params index 464bb2f0e82a..d83c31b60992 100755 --- a/libio/gen-params +++ b/libio/gen-params @@ -1,5 +1,5 @@ #!/bin/sh -# Copyright (C) 1992, 1993, 1994, 1997, 1998, 1999 Free Software Foundation +# Copyright (C) 1992, 1993, 1994, 1997, 1998, 1999, 2000 Free Software Foundation # # This file is part of the GNU IO Library. This library is free # software; you can redistribute it and/or modify it under the @@ -188,6 +188,40 @@ else echo "#define ${macro_prefix}HAVE_ST_BLKSIZE 0" fi +# A little test program to check if there is an O_APPEND. +cat >dummy.c < +#include +#include +int foo() +{ + return O_APPEND; +} +!EOF! + +if ${CC} -c dummy.c >/dev/null 2>&1 ; then + : +else + echo "#define O_APPEND 0" +fi + +# A little test program to check if there is an O_EXCL. +cat >dummy.c < +#include +#include +int foo() +{ + return O_EXCL; +} +!EOF! + +if ${CC} -c dummy.c >/dev/null 2>&1 ; then + : +else + echo "#define O_EXCL 0" +fi + # A little test program to check if the name 'clog' is defined in libm, # as it is under DEC UNIX. cat >dummy.c <