summaryrefslogtreecommitdiffstats
path: root/contrib/sendmail/libsm/flags.c
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/sendmail/libsm/flags.c')
-rw-r--r--contrib/sendmail/libsm/flags.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/contrib/sendmail/libsm/flags.c b/contrib/sendmail/libsm/flags.c
index b3877f1..7e2b0e2 100644
--- a/contrib/sendmail/libsm/flags.c
+++ b/contrib/sendmail/libsm/flags.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2000-2001 Sendmail, Inc. and its suppliers.
+ * Copyright (c) 2000-2001, 2003 Sendmail, Inc. and its suppliers.
* All rights reserved.
* Copyright (c) 1990, 1993
* The Regents of the University of California. All rights reserved.
@@ -13,7 +13,7 @@
*/
#include <sm/gen.h>
-SM_RCSID("@(#)$Id: flags.c,v 1.20 2001/09/11 04:04:48 gshapiro Exp $")
+SM_RCSID("@(#)$Id: flags.c,v 1.20.2.1 2003/09/03 18:51:56 ca Exp $")
#include <sys/types.h>
#include <sys/file.h>
#include <errno.h>
@@ -35,7 +35,7 @@ sm_flags(flags)
{
register int ret;
- switch(flags)
+ switch(SM_IO_MODE(flags))
{
case SM_IO_RDONLY: /* open for reading */
ret = SMRD;
@@ -57,5 +57,7 @@ sm_flags(flags)
ret = 0;
break;
}
+ if (SM_IS_BINARY(flags))
+ ret |= SM_IO_BINARY;
return ret;
}
OpenPOWER on IntegriCloud