Bad int32-uint32 conversion RangeDefect on OSX/BSD
### Description

This is reduced from a less trivial program

```Nim
import std/posix
proc uid(x: uint32): Uid = Uid(x)
var y: uint32
let myUid = geteuid()
echo myUid == uid(y)
```

### Nim Version

FreeBSD11/OSX 2019/x86_64; Nim Versions 1.6.12 and Nim-devel.

I could  not get this to fail on Linux/gcc/clang (even defining `Uid=int32` and re-doing the `geteuid` `importc`).

It's theoretically possible this is just "an old, unsupported OSX/FreeBSD version", but that's not a strong theory since the Uid type changed like maybe once ever.  And Nim versions from 1.6 & 2.2rcWhatever both fail.  It could be an x86_64-only thing, though.

It would be good for someone to reproduce this, though I could also try to update my virtual machines.

### Current Output

```text
nim r test
CC: test.nim
Hint: cache/nim/d/test/test_78D49F08F7399BBAA23E3ABB9857B12DC8142E29 [Exec]
/var/tmp/lc/test.nim(5) test
/var/tmp/lc/test.nim(2) uid
/var/tmp/Nim/lib/system/fatal.nim(53) sysFatal
Error: unhandled exception: value out of range: 0 notin 2147483648 .. 2147483647 [RangeDefect]
Error: execution of an external program failed: 'cache/nim/d/test/test_78D49F08F7399BBAA23E3ABB9857B12DC8142E29'
```


### Expected Output

There are at least 2 problems here which might have the same underlying cause:

  - First, `0` fits in any integer and so `uid(y)` should not fail.

  - Second, the exception message range is A+1 .. A.  This just has bad optics since compiler integer range checking logic raises when the range itself seems impossible to satisfy.  Since `range[T]` is a type, impossible ranges should be blockable statically.

### Known Workarounds

_No response_

### Additional Information

In the top-level of the Nim repo, `grep -r 'Uid\*' lib/posix` shows the type definitions:

```
lib/posix/posix_haiku.nim:  Uid* {.importc: "uid_t", header: "<sys/types.h>".} = uint32
lib/posix/posix_macos_amd64.nim:  Uid* {.importc: "uid_t", header: "<sys/types.h>".} = int32
lib/posix/posix_nintendoswitch.nim:  Uid* {.importc: "uid_t", header: "<sys/types.h>".} = cuint
lib/posix/posix_openbsd_amd64.nim:  Uid* {.importc: "uid_t", header: "<sys/types.h>".} = int32
lib/posix/posix_other.nim:  Uid* {.importc: "uid_t", header: "<sys/types.h>".} = int
lib/posix/posix_linux_amd64.nim:  Uid* {.importc: "uid_t", header: "<sys/types.h>".} = cuint
```
but as mentioned, I didn't really succeed in trying to synthesize something smaller than with the `import posix` for a more "portable failure".