Moved ioctl to posix.nim
This commit is contained in:
parent
aad55ae772
commit
2befe48e4d
2 changed files with 4 additions and 5 deletions
|
|
@ -2165,6 +2165,10 @@ proc pwrite*(a1: cint, a2: pointer, a3: int, a4: Off): int {.
|
||||||
importc, header: "<unistd.h>".}
|
importc, header: "<unistd.h>".}
|
||||||
proc read*(a1: cint, a2: pointer, a3: int): int {.importc, header: "<unistd.h>".}
|
proc read*(a1: cint, a2: pointer, a3: int): int {.importc, header: "<unistd.h>".}
|
||||||
proc readlink*(a1, a2: cstring, a3: int): int {.importc, header: "<unistd.h>".}
|
proc readlink*(a1, a2: cstring, a3: int): int {.importc, header: "<unistd.h>".}
|
||||||
|
proc ioctl*(f: FileHandle, device: uint): int {.importc: "ioctl",
|
||||||
|
header: "<sys/ioctl.h>", varargs, tags: [WriteIOEffect].}
|
||||||
|
## A system call for device-specific input/output operations and other
|
||||||
|
## operations which cannot be expressed by regular system calls
|
||||||
|
|
||||||
proc rmdir*(a1: cstring): cint {.importc, header: "<unistd.h>".}
|
proc rmdir*(a1: cstring): cint {.importc, header: "<unistd.h>".}
|
||||||
proc setegid*(a1: Gid): cint {.importc, header: "<unistd.h>".}
|
proc setegid*(a1: Gid): cint {.importc, header: "<unistd.h>".}
|
||||||
|
|
|
||||||
|
|
@ -2694,11 +2694,6 @@ when not defined(JS): #and not defined(nimscript):
|
||||||
proc endOfFile*(f: File): bool {.tags: [], benign.}
|
proc endOfFile*(f: File): bool {.tags: [], benign.}
|
||||||
## Returns true iff `f` is at the end.
|
## Returns true iff `f` is at the end.
|
||||||
|
|
||||||
proc ioctl*(f: FileHandle, device: uint): int {.importc: "ioctl",
|
|
||||||
header: "<sys/ioctl.h>", varargs, tags: [WriteIOEffect].}
|
|
||||||
## A system call for device-specific input/output operations and other
|
|
||||||
## operations which cannot be expressed by regular system calls
|
|
||||||
|
|
||||||
proc readChar*(f: File): char {.
|
proc readChar*(f: File): char {.
|
||||||
importc: "fgetc", header: "<stdio.h>", tags: [ReadIOEffect].}
|
importc: "fgetc", header: "<stdio.h>", tags: [ReadIOEffect].}
|
||||||
## Reads a single character from the stream `f`.
|
## Reads a single character from the stream `f`.
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue