tags:

views:

89

answers:

2

I'm trying to write a program that uses fattach but the compiler says fattach not implemented. I have included the header file stropts.h. what should I do?

A: 

Your two main options, as far as I can tell, are to rewrite your code to not use fattach() or to downgrade to a kernel version 2.4.5 or lower.

Other options include waiting for somebody to write fattach() support for current kernels and submitting a patch for it yourself.

chaos
+1  A: 

The fattach() function is in the Single Unix Specification, but it is marked obsolescent, which means it will be removed from a future version of the standard. It is part of the XSI STREAMS optional functionality.

Consequently, you should plan to rewrite your code so that it does not use fattach(); over time, fewer and fewer systems will support the function. (Or, you need to lobby hard to get it reinstated.)

In the interim, you have to find out which library includes the fattach() function and link with it. If no library includes it, then you have to track down whether there is an optionally installable library that contains it and install that.

Failing those options, you will probably have to do without it altogether on this machine. Think of it as an indication of the way things will work in the future.

Jonathan Leffler