View Issue Details

IDProjectCategoryView StatusLast Update
0037156FPCRTLpublic2020-07-13 12:58
ReporterValerij Assigned To 
PrioritynormalSeverityminorReproducibilityalways
Status feedbackResolutionopen 
OSFREEBSD 12 amd64 
Product Version3.0.4 
Summary0037156: fpPipe
Descriptionfunction FpPipe( var fildes: TFilDes):cint;
( https://www.freepascal.org/docs-html/current/rtl/baseunix/fppipe.html )
became function FpPipe( var fildes: TFilDes; aInt:cint):cint;

FPC-3.0.4
FreeBSD-12-amd64

Error: (3026) Wrong number of parameters specified for call to "FpPipe"
Error: (5088) Found declaration: FpPipe(var TFilDes;LongInt):LongInt;




TagsNo tags attached.
Fixed in Revision
FPCOldBugId
FPCTarget-
Attached Files

Activities

Valerij

2020-06-01 04:17

reporter   ~0123159

There is wrong example for fpPipe at https://www.freepascal.org/docs-html/current/rtl/baseunix/fppipe.html

Marco van de Voort

2020-06-02 15:09

manager   ~0123191

(the calling convention of the pipe syscall has historically been irregular and depending on system and architecture, the documentation is generated on Linux, and thus probably shows a linux prototype. I don't know where the additional parameter comes from, that seems a recent addition)

Thaddy de Koning

2020-06-03 12:51

reporter   ~0123201

Can be solved as a default value?
But I am not aware of any functionality failure as it is. FreeBSD is on a VM and I do not use it very often.

Marco van de Voort

2020-06-03 14:52

manager   ~0123204

I think the adding of the Linux specific flags to pipe is simply wrong and violates POSIX.

https://pubs.opengroup.org/onlinepubs/009695399/functions/pipe.html

IOW baseunix should just export fpPipe with one parameter (calling the syscall with some default flag value) , and add a linux specific variant to the linux unit if it access to it is needed for some purposes.

Marco van de Voort

2020-06-03 14:55

manager   ~0123205

Hmm, I can't find this variant with the flags in Linux rtl sources?

Please provide an example

Issue History

Date Modified Username Field Change
2020-06-01 04:05 Valerij New Issue
2020-06-01 04:17 Valerij Note Added: 0123159
2020-06-02 15:09 Marco van de Voort Note Added: 0123191
2020-06-03 12:51 Thaddy de Koning Note Added: 0123201
2020-06-03 14:52 Marco van de Voort Note Added: 0123204
2020-06-03 14:55 Marco van de Voort Assigned To => Marco van de Voort
2020-06-03 14:55 Marco van de Voort Status new => feedback
2020-06-03 14:55 Marco van de Voort FPCTarget => -
2020-06-03 14:55 Marco van de Voort Note Added: 0123205
2020-07-13 12:58 Marco van de Voort Assigned To Marco van de Voort =>