Am 17.11.13 04:49, schrieb Terry Moore: > I believe that if you want the Lua scripts to be portable across NetBSD > deployments, you should choose a well-known fixed width.
I don't see this as very important. Lua scripts will hardly depend on the size of an integer. > Watch out, by the way, for compiled scripts; I have not checked Lua 5.x, but > you may find if not careful that the compiled binary is not loadable on > machines with different choices for LP64, ILP32, etc. This is somewhat > independent of the choice of lua_Number mapping. Bytecode is not portable. Not even between userland and kernel Lua on the same machine. > > --Terry > >> -----Original Message----- >> From: tech-kern-ow...@netbsd.org [mailto:tech-kern-ow...@netbsd.org] On >> Behalf Of Lourival Vieira Neto >> Sent: Saturday, November 16, 2013 22:36 >> To: Christos Zoulas >> Cc: tech-kern@netbsd.org >> Subject: Re: [patch] changing lua_Number to int64_t >> >> On Sat, Nov 16, 2013 at 10:44 PM, Christos Zoulas <chris...@zoulas.com> >> wrote: >>> On Nov 16, 9:30pm, lourival.n...@gmail.com (Lourival Vieira Neto) > wrote: >>> -- Subject: Re: [patch] changing lua_Number to int64_t >>> >>> | On Sat, Nov 16, 2013 at 8:52 PM, Christos Zoulas <chris...@astron.com> >> wrote: >>> | > In article <52872b0c.5080...@msys.ch>, Marc Balmer <m...@msys.ch> >> wrote: >>> | >>Changing the number type to int64_t is certainly a good idea. Two >>> | >>questions, however: >>> | > >>> | > Why not intmax_t? >>> | >>> | My only argument is that int64_t has a well-defined width and, AFAIK, >>> | intmax_t could vary. But I have no strong feelings about this. Do you >>> | think intmax_t would be better? >>> >>> Bigger is better. And you can use %jd to print which is a big win. >> >> I agree that bigger is better and %jd is much better then "%" PRI/SCN. >> But don't you think that to know the exact width is even better? >> >> Regards, >> -- >> Lourival Vieira Neto >