<p>In the C / Unix environment I work in, I see some developers using <code>__progname</code> instead of <code>argv[0]</code> for usage messages. Is there some advantage to this? What's the difference between <code>__progname</code> and <code>argv[0]</code>.  Is it portable?</p>

```
__progname
```
isn't standard and therefore not portable, prefer
```
argv[0]
```
. I suppose
```
__progname
```
could lookup a string resource to get the name which isn't dependent on the filename you ran it as. But
```
argv[0]
```
will give you the name they
actually
ran it as which I would find more useful.