~ubuntu-branches/ubuntu/lucid/openssl/lucid-proposed

« back to all changes in this revision

Viewing changes to crypto/bio/bss_file.c

  • Committer: Bazaar Package Importer
  • Author(s): Kurt Roeckx
  • Date: 2009-06-13 18:15:46 UTC
  • mto: (11.1.5 squeeze)
  • mto: This revision was merged to the branch mainline in revision 34.
  • Revision ID: james.westby@ubuntu.com-20090613181546-vbfntai3b009dl1u
Tags: upstream-0.9.8k
ImportĀ upstreamĀ versionĀ 0.9.8k

Show diffs side-by-side

added added

removed removed

Lines of Context:
89
89
#include "bio_lcl.h"
90
90
#include <openssl/err.h>
91
91
 
 
92
#if defined(OPENSSL_SYS_NETWARE) && defined(NETWARE_CLIB)
 
93
#include <nwfileio.h>
 
94
#endif
 
95
 
92
96
#if !defined(OPENSSL_NO_STDIO)
93
97
 
94
98
static int MS_CALLBACK file_write(BIO *h, const char *buf, int num);
275
279
#endif
276
280
                {
277
281
#if defined(OPENSSL_SYS_WINDOWS)
278
 
                int fd = fileno((FILE*)ptr);
 
282
                int fd = _fileno((FILE*)ptr);
279
283
                if (num & BIO_FP_TEXT)
280
284
                        _setmode(fd,_O_TEXT);
281
285
                else
285
289
         /* Under CLib there are differences in file modes
286
290
         */
287
291
                if (num & BIO_FP_TEXT)
288
 
                        _setmode(fd,O_TEXT);
 
292
                        setmode(fd,O_TEXT);
289
293
                else
290
 
                        _setmode(fd,O_BINARY);
 
294
                        setmode(fd,O_BINARY);
291
295
#elif defined(OPENSSL_SYS_MSDOS)
292
296
                int fd = fileno((FILE*)ptr);
293
297
                /* Set correct text/binary mode */