summaryrefslogtreecommitdiff
path: root/mcon/U/d_fchown.U
diff options
context:
space:
mode:
Diffstat (limited to 'mcon/U/d_fchown.U')
-rw-r--r--mcon/U/d_fchown.U21
1 files changed, 18 insertions, 3 deletions
diff --git a/mcon/U/d_fchown.U b/mcon/U/d_fchown.U
index 0efbbe2..fb7f31c 100644
--- a/mcon/U/d_fchown.U
+++ b/mcon/U/d_fchown.U
@@ -12,7 +12,7 @@
?RCS: Revision 3.0 1993/08/18 12:06:01 ram
?RCS: Baseline for dist 3.0 netwide release.
?RCS:
-?MAKE:d_fchown: Inlibc
+?MAKE:d_fchown: Trylink cat i_unistd
?MAKE: -pick add $@ %<
?S:d_fchown:
?S: This variable conditionally defines the HAS_FCHOWN symbol, which
@@ -27,6 +27,21 @@
?H:.
?LINT:set d_fchown
: see if fchown exists
-set fchown d_fchown
-eval $inlibc
+$cat >try.c <<EOC
+#include <sys/types.h>
+#$i_unistd I_UNISTD
+#ifdef I_UNISTD
+#include <unistd.h>
+#endif
+int main(void)
+{
+ static int ret, fd;
+ static uid_t uid;
+ static gid_t gid;
+ ret |= fchown(fd, uid, gid);
+ return ret ? 0 : 1;
+}
+EOC
+set d_fchown
+eval $trylink