lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


It was thus said that the Great Dirk Laurie once stated:
> 2014-04-18 22:28 GMT+02:00 Sean Conner <sean@conman.org>:
> 
> > requires a C99 compiler
> 
> Does POSIX.1-2001 compliance imply all of C99?

  I think POSIX only covers functions available, not langauge features.  The
problematic part of the code is:

	static int luametaiconv_iconv(lua_State *L)
	{
	  const char *from;
	  size_t      fsize;
	  iconv_t    *pic;
	 
	  pic  = luaL_checkudata(L,1,TYPE_ICONV);
	  from = luaL_checklstring(L,2,&fsize);
	 
	  size_t  rc;
	  size_t  tsize    = fsize * 8; /* a reasonable guess here */
	  char    to[tsize];
	  char   *pto = to;

  I could hoise the variable declarations up above the two function calls,
but I still have the variably size array to contend with, and frankly, with
C99 being fifteen years old now, I want to use those features, damn it!  I
don't want to be held hostage to Microsoft, so I'm not changing the code.

  I do have a Lua rockspec written, but two things:

	1) there is another iconv wrapper already in luarocks.
	2) my version is LGPL.  [1]

  I'll probably submit the rockspec tomorrow though.

  -spc

[1]	Yes, I know it's an unpopular license.  Yes, I know you all (not
	everyone, but most everyone) would prefer a more "liberal" license. 
	Sorry.  I choose the GPL (and by extension, the LGPL for library
	like code) because I too, know what it's like to be a user and *not*
	have the source code to a program I like, or want to patch, or keep
	using.