[#38470] ruby-dev summary 21403-21530 (draft) — Minero Aoki <aamine@...>

青木です。

25 messages 2003/10/07
[#38475] Re: ruby-dev summary 21403-21530 (draft) — maili31s@... (SugHimsi==SUGIHARA Hiroshi) 2003/10/07

すぎむし。

[#38480] Re: ruby-dev summary 21403-21530 (draft) — Minero Aoki <aamine@...> 2003/10/08

青木です。

[#38481] marshal_dump (was Re: ) — m_seki@... 2003/10/08

[#38484] Re: marshal_dump (was Re: ) — matz@... (Yukihiro Matsumoto) 2003/10/09

まつもと ゆきひろです

[#38486] Re: marshal_dump (was Re: ) — Masatoshi Seki <m_seki@...> 2003/10/09

咳といいます

[#38489] exit status on exit! — YANAGAWA Kazuhisa <kjana@...4lab.to>

<http://www.unixuser.org/~ysjj/diary/?200310a&to=200310082#200310082>

29 messages 2003/10/09
[#38490] Re: exit status on exit! — Koji Arai <JCA02266@...> 2003/10/09

新井です。

[#38503] Re: exit status on exit! — YANAGAWA Kazuhisa <kjana@...4lab.to> 2003/10/10

In Message-Id: <20031010.082218.74733862.JCA02266@nifty.ne.jp>

[#38505] Re: exit status on exit! — Koji Arai <JCA02266@...> 2003/10/10

新井です。

[#38507] Re: exit status on exit! — matz@... (Yukihiro Matsumoto) 2003/10/11

まつもと ゆきひろです

[#38514] Re: exit status on exit! — YANAGAWA Kazuhisa <kjana@...4lab.to> 2003/10/11

In Message-Id: <1065883639.405037.23137.nullmailer@picachu.netlab.jp>

[#38515] Re: exit status on exit! — WATANABE Hirofumi <eban@...> 2003/10/11

わたなべです。

[ruby-list:38633] Re: dl and win32 API call

From: "Takaaki Tateishi" <ttate@...>
Date: 2003-10-22 14:07:48 UTC
List: ruby-list #38633
立石です。

Takaaki Tateishi said:
> gcc/cygwinについては時間できたら調べてみます。

とりあえずcygwinのgccでは以下の通りにコンパイルされるようです。

-- call.c --
int __stdcall test_stdcall(int a, int b)
{
  return 0;
}

int __cdecl test_cdecl(int a, int b)
{
  return 0;
}

int main(int argc, char *argv[])
{
  test_stdcall(0, 0);
  test_cdecl(0, 0);
  return 0;
}

-- call.s --
        .file   "call.c"
        .text
.globl _test_stdcall@8
        .def    _test_stdcall@8;        .scl    2;      .type   32;    
.endef
_test_stdcall@8:
        pushl   %ebp
        movl    %esp, %ebp
        movl    $0, %eax
        popl    %ebp
        ret     $8
.globl _test_cdecl
        .def    _test_cdecl;    .scl    2;      .type   32;     .endef
_test_cdecl:
        pushl   %ebp
        movl    %esp, %ebp
        movl    $0, %eax
        popl    %ebp
        ret
        .def    ___main;        .scl    2;      .type   32;     .endef
.globl _main
        .def    _main;  .scl    2;      .type   32;     .endef
_main:
        pushl   %ebp
        movl    %esp, %ebp
        subl    $24, %esp
        andl    $-16, %esp
        movl    $0, %eax
        movl    %eax, -4(%ebp)
        movl    -4(%ebp), %eax
        call    __alloca
        call    ___main
        movl    $0, 4(%esp)
        movl    $0, (%esp)
        call    _test_stdcall@8
        subl    $8, %esp
        movl    $0, 4(%esp)
        movl    $0, (%esp)
        call    _test_cdecl
        movl    $0, %eax
        leave
        ret


-- 
Takaaki Tateishi <ttate@ttsky.net>

In This Thread