Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-devel / 2007-09

a patch for fpioctl

4 messages · 4 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

ik

Hi,

I found a difference between the POSIX and the BSD implementation of ioctl, and the FPC fpioctrl is set as the way BSD is working.

My patch fixes that, making different decleration according to BSD/everything else. Please note that accidentally Linuxs' ioctl have parameters the way POSIX specs are writing it should have, and the BSD guys are implement it differently.

Ido

Reply by email

Aleš Katona
to ik

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Thanks for the patch. It was missing some parts (FPC_USE_LIBC and ossysc.inc needed to be changes too). I fixed it in r8676.

Ales

Show quoted text 17 lines
Hi, I found a difference between the POSIX and the BSD implementation of ioctl, and the FPC fpioctrl is set as the way BSD is working. My patch fixes that, making different decleration according to BSD/everything else. Please note that accidentally Linuxs' ioctl have parameters the way POSIX specs are writing it should have, and the BSD guys are implement it differently. Ido ---------------------------------------------------------------------- _______________________________________________ fpc-devel maillist - http://lists.freepascal.org/mailman/listinfo/fpc-devel

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFG/gwMFoLZReEjiMgRAmpxAJ9mbRLl5aRBI9skfBo4iumhHd5bPACg5AEy YXtLjBnjYq60WNaUPEF+5SI=
=Uxgp
-----END PGP SIGNATURE-----

Reply by email

Marco van de Voort
to Aleš Katona
Thanks for the patch. It was missing some parts (FPC_USE_LIBC and ossysc.inc needed to be changes too). I fixed it in r8676.

I don't like this solution. There is no way possible now to have a piece of code without ifdefs to work on all platforms. Maybe it wasn't before due to culong being 64-bits, but this is ugly.

Define a separate type for the second parameter?

Reply by email

Unknown author
to Marco van de Voort

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

It's ugly but have a files. There are ifdefs already, eg: for beos all over the place.

If we declare a new type, where do we put it?

Show quoted text 9 lines
I don't like this solution. There is no way possible now to have a piece of code without ifdefs to work on all platforms. Maybe it wasn't before due to culong being 64-bits, but this is ugly. Define a separate type for the second parameter? _______________________________________________ fpc-devel maillist - http://lists.freepascal.org/mailman/listinfo/fpc-devel

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFG/jibFoLZReEjiMgRAk0YAKDEH5L7BUkeCUWjfEcLLveDCyJXhwCglRZe YavhIjkSC9SxIkSFlTveIZU=
=btd5
-----END PGP SIGNATURE-----

Reply by email