* configure.in (rb_cv_missing__dtos18, rb_cv_missing_fconvert),

ext/digest/md5/md5.c, ext/openssl/ossl.c (main),
  ext/socket/extconf.rb (ipv6, wide-getaddrinfo): main should be int.

* main.c (main), win32/winmain.c, wince/wincemain.c (WinMain): envp is
  no longer used so long time.  based on a patch from Peter Bowen at
  [ruby-core:18208]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18459 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2008-08-09 23:15:08 +00:00
Родитель 0e3d10173b
Коммит a64266a728
8 изменённых файлов: 32 добавлений и 17 удалений

Просмотреть файл

@ -1,3 +1,13 @@
Sun Aug 10 08:15:05 2008 Nobuyoshi Nakada <nobu@ruby-lang.org>
* configure.in (rb_cv_missing__dtos18, rb_cv_missing_fconvert),
ext/digest/md5/md5.c, ext/openssl/ossl.c (main),
ext/socket/extconf.rb (ipv6, wide-getaddrinfo): main should be int.
* main.c (main), win32/winmain.c, wince/wincemain.c (WinMain): envp is
no longer used so long time. based on a patch from Peter Bowen at
[ruby-core:18208]
Sat Aug 9 22:05:29 2008 Tanaka Akira <akr@fsij.org> Sat Aug 9 22:05:29 2008 Tanaka Akira <akr@fsij.org>
* transcode.c (transcode_loop): take destination and resize function * transcode.c (transcode_loop): take destination and resize function

Просмотреть файл

@ -1534,11 +1534,12 @@ case "$target_os" in
changequote(<<, >>)dnl changequote(<<, >>)dnl
<< <<
#include <stdio.h> #include <stdio.h>
main () int
main()
{ {
char buf[256]; char buf[256];
sprintf (buf, "%g", 1e+300); sprintf(buf, "%g", 1e+300);
exit (strcmp (buf, "1e+300") ? 0 : 1); return (strcmp (buf, "1e+300") ? 0 : 1);
} }
>>, >>,
changequote([, ])dnl changequote([, ])dnl
@ -1553,11 +1554,12 @@ changequote(<<, >>)dnl
<< <<
#include <stdio.h> #include <stdio.h>
#include <math.h> #include <math.h>
main () int
main()
{ {
char buf[256]; char buf[256];
sprintf (buf, "%f", log(exp(1.0))); sprintf(buf, "%f", log(exp(1.0)));
exit (strcmp (buf, "1.000000") ? 0 : 1); return (strcmp (buf, "1.000000") ? 0 : 1);
} }
>>, >>,
changequote([, ])dnl changequote([, ])dnl

Просмотреть файл

@ -60,6 +60,7 @@
* A.5 of RFC 1321, reproduced below. * A.5 of RFC 1321, reproduced below.
*/ */
#include <string.h> #include <string.h>
int
main() main()
{ {
static const char *const test[7*2] = { static const char *const test[7*2] = {
@ -100,6 +101,7 @@ main()
*/ */
#ifdef COMPUTE_T_VALUES #ifdef COMPUTE_T_VALUES
#include <math.h> #include <math.h>
int
main() main()
{ {
int i; int i;

Просмотреть файл

@ -488,7 +488,7 @@ Init_openssl()
* Check if all symbols are OK with 'make LDSHARED=gcc all' * Check if all symbols are OK with 'make LDSHARED=gcc all'
*/ */
int int
main(int argc, char *argv[], char *env[]) main(int argc, char *argv[])
{ {
return 0; return 0;
} }

Просмотреть файл

@ -38,6 +38,7 @@ if enable_config("ipv6", default_ipv6)
if checking_for("ipv6") {try_link(<<EOF)} if checking_for("ipv6") {try_link(<<EOF)}
#include <sys/types.h> #include <sys/types.h>
#include <sys/socket.h> #include <sys/socket.h>
int
main() main()
{ {
socket(AF_INET6, SOCK_STREAM, 0); socket(AF_INET6, SOCK_STREAM, 0);
@ -123,6 +124,7 @@ getaddr_info_ok = enable_config("wide-getaddrinfo") do
#define AF_LOCAL AF_UNIX #define AF_LOCAL AF_UNIX
#endif #endif
int
main() main()
{ {
int passive, gaierr, inet4 = 0, inet6 = 0; int passive, gaierr, inet4 = 0, inet6 = 0;

2
main.c
Просмотреть файл

@ -18,7 +18,7 @@
RUBY_GLOBAL_SETUP RUBY_GLOBAL_SETUP
int int
main(int argc, char **argv, char **envp) main(int argc, char **argv)
{ {
#ifdef RUBY_DEBUG_ENV #ifdef RUBY_DEBUG_ENV
ruby_set_debug_option(getenv("RUBY_DEBUG")); ruby_set_debug_option(getenv("RUBY_DEBUG"));

Просмотреть файл

@ -1,10 +1,10 @@
#include <windows.h> #include <windows.h>
#include <stdio.h> #include <stdio.h>
extern int main(int, char**, char**); extern int main(int, char**);
int WINAPI int WINAPI
WinMain(HINSTANCE current, HINSTANCE prev, LPSTR cmdline, int showcmd) WinMain(HINSTANCE current, HINSTANCE prev, LPSTR cmdline, int showcmd)
{ {
return main(0, NULL, NULL); return main(0, NULL);
} }

Просмотреть файл

@ -2,18 +2,17 @@
#include <stdio.h> #include <stdio.h>
#include "wince.h" #include "wince.h"
extern int main(int, char**, char**); extern int main(int, char**);
int WINAPI int WINAPI
WinMain(HINSTANCE current, HINSTANCE prev, LPWSTR wcmd, int showcmd) WinMain(HINSTANCE current, HINSTANCE prev, LPWSTR wcmd, int showcmd)
{ {
/* wchar_t -> char */ /* wchar_t -> char */
wce_SetCommandLine(wcmd); wce_SetCommandLine(wcmd);
wce_SetCurrentDir(); wce_SetCurrentDir();
/* main. */ /* main. */
return main(0, NULL, NULL); return main(0, NULL);
} }