Skip to content

DJGPP face lift#5708

Closed
dot-asm wants to merge 3 commits intoopenssl:masterfrom
dot-asm:djgpp-port
Closed

DJGPP face lift#5708
dot-asm wants to merge 3 commits intoopenssl:masterfrom
dot-asm:djgpp-port

Conversation

@dot-asm
Copy link
Contributor

@dot-asm dot-asm commented Mar 21, 2018

In case one wonders, it does build with no-sock and passes some rudimentary tests.

Andy Polyakov added 3 commits March 21, 2018 11:16
At earlier point e_os.h was omitted from a number of headers (in order
to emphasize OS neutrality), but this affected o_fopen.c, which is not
OS-neutral, and contains some DJGPP-specific code.
Some platforms, cough-DJGPP, fail to compile claiming that requested
alignment is greater than maximum possible. Supposedly original
alignment was result of an attempt to utilize AVX2...
@mattcaswell mattcaswell added this to the 1.1.1 milestone Mar 21, 2018
# include <windows.h>
# endif
# ifdef __DJGPP__
# include <unistd.h>
Copy link
Member

@levitte levitte Mar 21, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we just take away that config parameterattribute?

Copy link
Contributor Author

@dot-asm dot-asm Mar 21, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't follow... Do you mean unistd (that is customarily assigned to <unistd.h>)? If yes, then in long run, yes, totally. Even though there might be kind of a chicken-n-egg problem. I mean if you want make it #ifdef conditional, then you you'd probably want to use POSIX_something, but those customarily come with unistd.h. Well, it's not like they are defined in unistd.h, but unistd.h would be number 1 choice to get them without thinking too much about what system is it. Though there is one predefine that is quite reliable, __unix__/__unix... In case you wonder, if it's defined by djgpp compiler? Yes, Cygwin? Yes. Can you guess if "MSYS" compiler does? "MinGW" cross-compiler? Answers are of course "yes" and "no". This by the way reliable way to tell apars "native" and "hosted" that are discussed in updated NOTES.WIN...

But in either case here, in o_fopen.c it would still be DJGPP-specific. In normal case this module would require stdio along alone. This is non-POSIX thing. And it's only DJGPP that needs that POSIX-y pathconf to take a decision.

Copy link
Contributor Author

@dot-asm dot-asm Mar 21, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Though there is one predefine that is quite reliable, __unix__/__unix... In case you wonder,

Well, there is one that doesn't follow the pattern. Can you guess which one? Vendor that always has to be special... Anybody?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I should mark my side notes explicitely as such... But to answer your question, mine was about the config attribute unistd, which is usually assigned "<unistd.h>", except on nextstep...

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So many choices... MSFT... Apple ... don't keep us guessing, @dot-asm

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I meant can you guess one that you would totally expect to pre-define __unix__ in compiler. One that is equipped with Bourne shell, has find, grep, ls, ... and even has <unistd.h> that defines POSIX_things... It can't be Windows... But of course it's Apple, you guessed it.

levitte pushed a commit that referenced this pull request Mar 22, 2018
At earlier point e_os.h was omitted from a number of headers (in order
to emphasize OS neutrality), but this affected o_fopen.c, which is not
OS-neutral, and contains some DJGPP-specific code.

Reviewed-by: Rich Salz <[email protected]>
(Merged from #5708)
levitte pushed a commit that referenced this pull request Mar 22, 2018
In other words no-sock DJGPP build should suppress syslogging.

Reviewed-by: Rich Salz <[email protected]>
(Merged from #5708)
levitte pushed a commit that referenced this pull request Mar 22, 2018
Some platforms, cough-DJGPP, fail to compile claiming that requested
alignment is greater than maximum possible. Supposedly original
alignment was result of an attempt to utilize AVX2...

Reviewed-by: Rich Salz <[email protected]>
(Merged from #5708)
@dot-asm dot-asm closed this Mar 22, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants