Compare commits

..

No commits in common. "1c41faaebc0bb4abb4b6611a812310cbc4649667" and "07c8a6f056bcd8c310a2eb4f83964b2d22c6c141" have entirely different histories.

5 changed files with 5 additions and 24 deletions

View File

@ -12,11 +12,6 @@
#ifndef __STDC_WANT_LIB_EXT1__ /*(enable C11 Annex K ext1 *_s functions)*/
#define __STDC_WANT_LIB_EXT1__ 1
#endif
#if defined(__APPLE__) && defined(__MACH__)
#ifndef _DARWIN_C_SOURCE
#define _DARWIN_C_SOURCE
#endif
#endif
#include "first.h"
#ifdef __FreeBSD__
#ifndef _RSIZE_T_DEFINED /* expecting __EXT1_VISIBLE 1 and _RSIZE_T_DEFINED */

View File

@ -13,12 +13,6 @@
#define _DEFAULT_SOURCE
#endif
#if defined(__APPLE__) && defined(__MACH__)
#ifndef _DARWIN_C_SOURCE
#define _DARWIN_C_SOURCE
#endif
#endif
#ifndef __STDC_WANT_LIB_EXT1__
#define __STDC_WANT_LIB_EXT1__ 1
#endif

View File

@ -703,8 +703,8 @@ static const char js_simple_table_resort[] = \
" var bt = get_inner_text(b.cells[sort_column]);\n" \
" var cmp;\n" \
" if (sort_column == name_column) {\n" \
" if (at == '../') return -1;\n" \
" if (bt == '../') return 1;\n" \
" if (at == '..') return -1;\n" \
" if (bt == '..') return 1;\n" \
" }\n" \
" if (a.cells[sort_column].className == 'int') {\n" \
" cmp = parseInt(at)-parseInt(bt);\n" \

View File

@ -295,11 +295,7 @@ static int magnet_readdir(lua_State *L) {
const char * const s = luaL_checkstring(L, 1);
DIR * const d = opendir(s);
if (d) {
#if !defined(LUA_VERSION_NUM) || LUA_VERSION_NUM < 504
DIR ** const dp = (DIR **)lua_newuserdata(L, sizeof(DIR *));
#else
DIR ** const dp = (DIR **)lua_newuserdatauv(L, sizeof(DIR *), 0);
#endif
*dp = d;
magnet_readdir_metatable(L);
lua_setmetatable(L, -2);
@ -609,12 +605,8 @@ static int magnet_stat(lua_State *L) {
* (script must not cache sce in persistent global state for later use)
* (If we did want sce to be persistent, then could increment sce refcnt,
* and set up __gc metatable method to decrement sce refcnt) */
stat_cache_entry ** const udata =(struct stat_cache_entry**)/* (sp += 1) */
#if !defined(LUA_VERSION_NUM) || LUA_VERSION_NUM < 504
lua_newuserdata(L, sizeof(stat_cache_entry *));
#else
lua_newuserdatauv(L, sizeof(stat_cache_entry *), 0);
#endif
stat_cache_entry ** const udata = /* (sp += 1) */
(struct stat_cache_entry **)lua_newuserdata(L, sizeof(stat_cache_entry *));
*udata = sce;
magnet_stat_metatable(L); /* (sp += 1) */

View File

@ -137,7 +137,7 @@ sub wait_for_port_with_proc {
# the process is gone, we failed
require POSIX;
if (0 != waitpid($child, POSIX::WNOHANG())) {
if (0 != waitpid($child, POSIX::WNOHANG)) {
return -1;
}
if (0 >= $timeout) {