tmodulealias.nim 306 B

1234567891011121314151617181920
  1. discard """
  2. disabled: true
  3. """
  4. when defined(windows):
  5. import winlean
  6. else:
  7. import posix
  8. when defined(windows):
  9. template orig: expr =
  10. winlean
  11. else:
  12. template orig: expr =
  13. posix
  14. proc socket(domain, typ, protocol: int): int =
  15. result = orig.socket(ord(domain), ord(typ), ord(protocol)))