-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Build errors on HP-UX #39
Comments
OK. If clock_gettime is an available function but CLOCK_MONOTONIC is not a valid clock_id, then we will have to fall back to CLOCK_REALTIME. Can you please add the following to
|
Thanks for the quick feedback! I'm slower, as this beast is hosted remotely and kept mostly stopped because it's a power hog. Next issue:
|
No problem. We'll get there eventually. |
Looking at what mksh does, it seems like the thing to do is wrap that line,
At least for now. We can add a configure check for VDISCARD later. |
Same error occurs, as the branching doesn't function as expected, it seems. I guess it's not the right thing to do, but if I use Next error would be:
|
Ah. That tells me that hpux isn't the right define to detect HPUX. That's fine; I'll make it a more generic check for VDISCARD. Could you tell me what the default shell is on the machine? Is it |
Though now looking at the code, that definitely needs to change for everyone, so I'll go back to the drawing board :) |
OK, after some research...
Also, in the file
|
OK. For now, I'll keep using the stupid define that doesn't break on HP-UX.
On HP-UX,
|
With these changes (
I repeat the
|
|
Also can you check to see if you have any of the defines here: https://github.com/ibara/oksh/blob/master/portable.h#L49 |
By default, only 8 characters are allowed as maximum length for usernames. However, on this particular system, the maximum allowed length has been raised with
Sorry, you'll have to spell it out for me, I'm not into C programming. |
Sorry, don't know how to check for that. Also, forgot to say above that the default path for a regular HP-UX user seems to be:
No, it's not a joke. This is what a freshly added user has in the default shell with no home dir. If I use All this should be taken with a grain of salt, I'm not really an HP-UX admin, even though I used to look after a couple of HP-UX servers for a while and still have access to start one of them if needed. |
That's... a lot. Let's try this: In
Then at line 93:
|
Thanks! The above solves previous errors, build continues to:
|
Ah! I suspect we are very close. |
True, build is successful if using However, running the resulting binary gives:
|
That's a bummer. |
The system has this package installed with Have tried the same patched tree with similar options, but compilation bailes out early on:
|
Remove that line from edit.c |
Actually, that line was supposed to be Apparently, with
|
Ah, that means my configure check for needing -std=c99 is slightly off. I check for In any event, that's a real easy fix, so easy I will add it to the file directly. For now, add the following lines in
|
You could also do without the macros: error = INVALID;
- else if ((ll == LLONG_MIN && errno == ERANGE) || ll < minval)
+ else if ((errno == ERANGE && ll < 0) || ll < minval)
error = TOOSMALL;
- else if ((ll == LLONG_MAX && errno == ERANGE) || ll > maxval)
+ else if ((errno == ERANGE && ll > 0) || ll > maxval)
error = TOOLARGE; |
I'd prefer not to. If you want to see changes in these files, send them to the OpenBSD tech@ mailing list. |
There is no much sense to add this change to OpenBSD source code since LLONG_MIN and LLONG_MAX are always defined there. I thought this change would be cleaner than explicitly defining those macros since that way we don't assume long long to always have 64 bits. |
How many 128-bit long long platforms are out there? Your change also subtly violates the expected return values for strtoll on overflow or underflow. oksh is C99 and so we can and should expect that. Support for non-conforming platforms should be only in the most minimal, non-invasive of approaches. If there are any 128-bit long long platforms out there and they're not C99 compliant, they're probably not worth supporting. |
C99 compliant strtoll sets errno to ERANGE only when it returns LLONG_MIN or LLONG_MAX. One of those values is positive and one is negative. So the code would remain equivalent, but would not need those macros defined. |
This worked. Build is successful now:
Unfortunately, the resulting binary seems to have the same issue as the one produced by the native compiler:
Any more ideas to try? |
I don't. At least, not with access to the machine. |
Ah, forgot my email :) |
OK, sent. |
Qemu support for HP-UX has gotten much much better. I was able to get HP-UX 11.11 running on it. And I was able to build a working oksh on it. I learned that on Itanium, with aCC one should add +DD64 to CFLAGS. I don't know 100% if that will work but that was the advice I was given. |
Hi,
Fellow OpenBSD user here, with access to an Itanium HP-UX 11.31i server. I gave this a try, inspired by your call for HP-UX testing in
README.md
.Have tried to build this with both the C and aC++ compilers (the latter can also compile ANSI-C if invoked with
-Ae
).Versions used:
The text was updated successfully, but these errors were encountered: