~ubuntu-branches/ubuntu/intrepid/ruby1.9/intrepid-updates

« back to all changes in this revision

Viewing changes to ext/dl/cptr.c

  • Committer: Bazaar Package Importer
  • Author(s): Matthias Klose
  • Date: 2007-09-04 16:01:17 UTC
  • mfrom: (1.1.8 upstream)
  • Revision ID: james.westby@ubuntu.com-20070904160117-i15zckg2nhxe9fyw
Tags: 1.9.0+20070830-2ubuntu1
* Sync from Debian; remaining changes:
  - Add -g to CFLAGS.
* Fixes build failure on ia64.
* Fixes build failure with gcc-4.2 on lpia.
* Robustify check for target_os, fixing build failure on lpia.
* Set Ubuntu maintainer address.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/* -*- C -*-
2
 
 * $Id: cptr.c 11869 2007-02-24 10:30:50Z nobu $
 
2
 * $Id: cptr.c 12907 2007-08-08 10:20:08Z matz $
3
3
 */
4
4
 
5
 
#include <ruby.h>
6
 
#include <rubyio.h>
 
5
#include <ruby/ruby.h>
 
6
#include <ruby/io.h>
7
7
#include <ctype.h>
8
 
#include <version.h> /* for ruby version code */
9
8
#include "dl.h"
10
9
 
11
10
VALUE rb_cDLCPtr;
421
420
        rb_io_t *fptr;
422
421
        FILE *fp;
423
422
        GetOpenFile(val, fptr);
424
 
#if RUBY_VERSION_CODE >= 190
425
423
        fp = rb_io_stdio_file(fptr);
426
 
#else
427
 
        fp = fptr->f;
428
 
#endif
429
424
        return rb_dlptr_new(fp, 0, NULL);
430
425
    }
431
426
    else if( rb_obj_is_kind_of(val, rb_cString) == Qtrue ){