1 /* ======================================================================== 2 * Copyright 1988-2006 University of Washington 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * 11 * ======================================================================== 12 */ 13 14 /* 15 * Program: Operating-system dependent routines -- Linux version 16 * 17 * Author: Mark Crispin 18 * Networks and Distributed Computing 19 * Computing & Communications 20 * University of Washington 21 * Administration Building, AG-44 22 * Seattle, WA 98195 23 * Internet: MRC@CAC.Washington.EDU 24 * 25 * Date: 10 September 1993 26 * Last Edited: 30 August 2006 27 */ 28 29 /* 30 *** These lines are claimed to be necessary to build on Debian Linux on an 31 *** Alpha. 32 */ 33 34 #ifndef _XOPEN_SOURCE 35 #define _XOPEN_SOURCE 1 36 #endif /* _XOPEN_SOURCE */ 37 #ifndef _BSD_SOURCE 38 #define _BSD_SOURCE 1 39 #endif /* _BSD_SOURCE */ 40 41 /* end Debian Linux on Alpha strangeness */ 42 43 #include <stdlib.h> 44 #include <string.h> 45 #include <unistd.h> 46 #include <sys/types.h> 47 #include <dirent.h> 48 #include <time.h> /* for struct tm */ 49 #include <fcntl.h> 50 #include <syslog.h> 51 #include <sys/file.h> 52 53 54 /* Linux gets this wrong */ 55 56 #define setpgrp setpgid 57 58 #define direct dirent 59 60 #define flock safe_flock 61 62 63 #include "env_unix.h" 64 #include "fs.h" 65 #include "ftl.h" 66 #include "nl.h" 67 #include "tcp.h" 68