Comments (9)
GCC 4.2.1 does not report this as an error in base OpenBSD. As more programs and ports are linted and eventually switched over to clang, the code will be changed. It's up to Ibara if he wants to diverge from the original OpenBSD source to accommodate these being reported as errors. I can prepare a pull request if you want.
from oksh.
Yes please.
Note: GCC does not report the errors because it does not make clang's extensive audit. The errors are still there, whether GCC reports them or not.
from oksh.
#6 addresses this issue.
from oksh.
Patches for
exec.c
expr.c
jobs.c
lex.c
main.c
misc.c
var.c
Results of compilation and comparison
>ls -l /bin/*sh
-r-xr-xr-x 1 root wheel 626272 Mar 23 00:57 /bin/bash
-rwxr-xr-x 1 root wheel 375632 Mar 23 00:57 /bin/csh
-r-xr-xr-x 1 root wheel 1377872 Mar 23 00:57 /bin/ksh
-rwxr-xr-x 1 root wheel 354424 May 9 10:45 /bin/oksh
-r-xr-xr-x 1 root wheel 630464 Mar 23 00:57 `/bin/sh`
-rwxr-xr-x 1 root wheel 375632 Mar 23 00:57 /bin/tcsh
-rwxr-xr-x 1 root wheel 592656 Mar 23 00:57 /bin/zsh
>otool -L /bin/oksh
/bin/oksh:
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1238.50.2)
How to use oksh as default shell (MacOS)
Go to System Preferences -> Users & Groups
Click the lock icon to unlock the preference pane
Right-click (or control-click) on the user and select "advanced options"
Change "login shell" to /bin/oksh.
from oksh.
hey @hdatma, when I get some time I can review these and create another pull request with these changes, but please be aware that most of openbsd isn't using C99 as a standard, most utils are still using ANSI C or C89 as the base. I think that we should fix errors/warnings (I think these reported are valid) that are discovered by clang, but while adhering to the standards (-std=c89 or -ansi) added to your compile will show errors/issues while not introducing code that could be troublesome to compile on platforms that don't have a C99+ compiler handy. Thanks!
from oksh.
#6 fixes all issues mentioned above in the patch.zip
from oksh.
Hey! OpenBSD is on track to replace gcc with clang. The two previous releases removed obsolete architectures on purpose, and the next release is said to include clang along with gcc.
from oksh.
I think we can close this issue, as all errors have been cleared with patches.
from oksh.
Closed.
from oksh.
Related Issues (20)
- ^L in vi mode prints the prompt incorrecty when PS1 is more than one line HOT 7
- `./configure --enable-ksh` stills installs manual as `oksh` HOT 3
- Announcement: renaming branch to main on 11/26. HOT 2
- FreeBSD 12.2p4: ^L in vi-mode prints as a string of literals rather than clearing the screen HOT 3
- Stop line wrapping in emacs mode. HOT 1
- oksh not compliant with ksh88 vi-editing mode?
- `shift $#` inside for loop without `in word...` part breaks the parameter list HOT 1
- down-history: difference with bash/ksh
- Feature request: bashism "<<<"
- Compiling oksh against netbsd-curses HOT 3
- $RANDOM within scripts returns the same value HOT 3
- What is correct value for TERM to ^L=clear-screen on Linux? HOT 5
- ksh attempts to cd into non-existent cdpath before trying argument first HOT 11
- command wrapping too early HOT 5
- Building fine on MSYS2 MSYS HOT 1
- "Illegal instruction" error after compiling oksh with `zig cc` and `--no-thanks` flag
- Slow performance on multiple `printf` HOT 1
- releases lack NEWS
- command variable assignment exports for function
- Ctrl+L doesn't clear HOT 2
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 oksh.