Comments (9)
SIGPOLL is POSIX-mandated, so it's not a bug in luaposix.
You're welcome to supply a workaround patch for Darwin.
from luaposix.
(I'd prefer a patch that takes into account however Darwin gets around the lack of SIGPOLL, and hence provides equivalent functionality, but if that's too much work or not possible, then simply not having SIGPOLL on Darwin is OK.)
from luaposix.
(Edited signal names)
I suppose thats why they provide it if "_DARWIN_C_SOURCE" is not set.
How about this workaround. Judging from their signal.h SIGIOTand SIGEMT seem to be their replacement, whatever it means.
#if (!defined(_DARWIN_C_SOURCE))
set_const("SIGPOLL", SIGPOLL);
#else
set_const("SIGIOT", SIGIOT);
set_const("SIGEMT", SIGEMT);
#endif
Or we teach configure to not set _DARWIN_C_SOURCE, then apples headers seem to try to be more POSIX compliant.
from luaposix.
SIGABRT is already defined. (Again, it's POSIX-mandated.) The bit of header file you quote is defining SIGIOT to be SIGABRT, not defining SIGABRT.
SIGEMT seems to do something else entirely (it's about an emulated instruction; is this to do with Rosetta?) So it's not a replacement. I have no desire to support non-POSIX signals in luaposix.
As to not setting _DARWIN_C_SOURCE, what are the downsides of doing that? I presume it's set by default for a reason...
I'm sorry, I don't have time to learn about an OS I don't use; perhaps you could seek guidance elsewhere? I suggest the autoconf or gnulib mailing lists, as there seems to be a general point of interest here, namely, what is one supposed to do about the lack of SIGPOLL on Darwin, and hence there should really be a patch to autotools, or at least a gnulib module to handle the problem.
from luaposix.
I got my stuff sorted with commenting out SIG_POLL I don't use it eitherway, only wanted to help to get luaposix be more compatible and make the life for others easier. If you don't care, then lets just stop and forget it.
from luaposix.
I certainly do care, but I would rather this issue were fixed where it should be fixed, not in luaposix. (Of course, really it should be fixed in Darwin, but in the absence of that, a fix that helps all GNU autotools-based software is the best we can do.)
If you don't want to do that, then can you please just supply a simple patch that tests #ifdef SIGPOLL, with a comment explaining this is a workaround for Darwin, and then at least you've helped Darwin users of luaposix.
from luaposix.
I don't think its apple's nor gnulib's problem.
Gnulibs point of view: By default lets turn on all System extenstions ( http://fossies.org/unix/privat/metalog-2.tar.gz:a/metalog-2/gnulib/m4/extensions.m4 ) Whatever that got them into this autoconf default policy. But they turn on _DARWIN_C_SOURCE like they turn on everything the system can do. Similar happens with all GNU extensions. I suppose most often people come complaining this or that doesn't work, because a system extension feature macro is not set.
Apples point of view: programs can either chose to have a standards compliant environment emulation, or can announce they know of our dirty tricks and extensions and say so with Macro (_DARWIN_C_SOURCE). Again GNU is not much different in this regard.
I suppose configure.ac needs to be taught not to include AC_USE_SYSTEM_EXTENSIONS if our full aim is to stick to the standard and not do with system extensions. Thats what we wand, no? I just don't yet see how. I use autoconf in my project myself, but I hate it, since I'm not even close to understand albeit many years of programming experience.
from luaposix.
Thanks for the analysis. I'll ask the gnulib folk what they think.
from luaposix.
Turns out that SIGPOLL (and also SIGPROF) are marked obsolescent, so I've removed them from luaposix in git master. This should cure your build problem. Thanks again for the report.
from luaposix.
Related Issues (20)
- Incorrect fork error-handling HOT 2
- luke: fatal: required symbol 'crypt' not found in any of libc, libcrypt HOT 5
- Using unix sockets in a non-blocking manner / timeouts HOT 2
- Small error in doc for poll(): return is not 0/1 but the number of ready fd's
- pwd.getpwuid fails with 0.0 as input HOT 3
- posix.fcntl is a function, not a table. HOT 15
- luxposix 36.0 won't compile properly on CentOS7 - time.h issues HOT 14
- posix.sys.socket - recv() crashes with socket and timeout in v36.1 (v36.0) HOT 6
- Lazy loading of posix.sys.stat fails in both 35.1 and 36.1 HOT 6
- luaposix won't compile in termux HOT 26
- Missing rockspec file in v36.1 HOT 7
- Get an error when trying to cross-compile HOT 1
- String overflow for unistd.read(). HOT 6
- Epoch inconsistency?
- Error on import: posix/glob.so: wrong ELF class: ELFCLASS64 HOT 7
- invalid elf header HOT 1
- luaposix does not cross compile properly HOT 5
- studio code does not seems to like the require HOT 2
- luaposix installs but I cant use it in cygwin HOT 1
- [MISSING] tcgetwinsize HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from luaposix.