[前][次][番号順一覧][スレッド一覧]

ruby-changes:37315

From: nobu <ko1@a...>
Date: Sat, 24 Jan 2015 23:59:34 +0900 (JST)
Subject: [ruby-changes:37315] nobu:r49396 (trunk): dln_find.c: define S_ISREG

nobu	2015-01-24 23:59:13 +0900 (Sat, 24 Jan 2015)

  New Revision: 49396

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=49396

  Log:
    dln_find.c: define S_ISREG
    
    * dln_find.c (dln_find_1): on some platforms, S_ISREG() is not
      provided.

  Modified files:
    trunk/dln_find.c
Index: dln_find.c
===================================================================
--- dln_find.c	(revision 49395)
+++ dln_find.c	(revision 49396)
@@ -278,6 +278,9 @@ dln_find_1(const char *fname, const char https://github.com/ruby/ruby/blob/trunk/dln_find.c#L278
 	}
 #endif /* _WIN32 or __EMX__ */
 
+#ifndef S_ISREG
+# define S_ISREG(m) (((m) & S_IFMT) == S_IFREG)
+#endif
 	if (stat(fbuf, &st) == 0 && S_ISREG(st.st_mode)) {
 	    if (exe_flag == 0) return fbuf;
 	    /* looking for executable */

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]