hercules-390 / hyperion

Hercules 390
Other
248 stars 67 forks source link

Compiles fail on platforms which don't have semaphore.h #155

Closed PeterCoghlan closed 7 years ago

PeterCoghlan commented 7 years ago

In hstdinc.h, there is:

#include <semaphore.h>

It is enclosed in #if !defined(_MSVC_) / #endif but this assumes that all other platforms provide this file, otherwise hacking the source is required to get pretty much anything to compile.

Is this used for anything? Searching for "semaphore" in the source only results on one hit on message HHC02340 in msgenu.h and I don't see this message referenced elsewhere. Maybe the #include and message are leftovers from something which is no longer used and can be removed entirely?

If the #include is required for something, can we have a HAVE_SEMAPHORE_H flag or something similar here?

PeterCoghlan commented 7 years ago

The above should say hash include open angle bracket semaphore.h close angle bracket but the github webserver appears to have eaten the angle brackets and filename between them.

jphartmann commented 7 years ago

Ah, the joys of markdown. Anything that remotely resembles programming should be enclosed in backticks. Single backtick for inline; three for a group of lines. So here is a bunch of lines with a single backtick; I don't think it is possible to show one inline.

`

I've updated the above append to show what you wanted to express.

I think the #include is a leftover from one of my failed attempts to use a particular type of semaphore that then turned out to be implemented on top of something that I absolutely did not want. Please remove it (can you?)

PeterCoghlan commented 7 years ago

Thanks John!

I can't remove it myself. Could you do it please?

(Perhaps the HHC02340 message should also be removed?)

jphartmann commented 7 years ago

Done including message.

Fish-Git commented 7 years ago

The above should say hash include open angle bracket semaphore.h close angle bracket but the github webserver appears to have eaten the angle brackets and filename between them.

You need to use the HTML escapes '&lt;' and '&gt;', e.g.:

"If the #include<semaphore.h> is required for something,..."

ivan-w commented 7 years ago

This is a github issue !

Github should sanitize user/external input so as to prevent various issues (sql injection, Javascript execution on client, etc).

;DROP TABLE USERS;

:P

--Ivan

On 9/3/2016 1:14 PM, Fish-Git wrote:

The above should say hash include open angle bracket semaphore.h
close angle bracket but the github webserver appears to have eaten
the angle brackets and filename between them.

You need to use the HTML escapes |'<'| and |'>'|, e.g.:

"If the #include is required for something,..."

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/hercules-390/hyperion/issues/155#issuecomment-244540771, or mute the thread https://github.com/notifications/unsubscribe-auth/ABjMW6x5tC-1aq1-hwE4giv7D5Wf7D-tks5qmVamgaJpZM4J0Q8s.

Fish-Git commented 7 years ago

Github should sanitize user/external input

Isn't that what it is doing?

Fish-Git commented 7 years ago

;DROP TABLE USERS;

https://xkcd.com/327/

Fish-Git commented 7 years ago

Returning back to the original issue for a brief moment, should this issue be closed now that it has been resolved?

PeterCoghlan commented 7 years ago

I have to run now and don't have time to test. I will assume that all will be well and close the issue now. I will reopen it if there are any problems when I test it later.