PageRenderTime 22ms CodeModel.GetById 15ms app.highlight 3ms RepoModel.GetById 1ms app.codeStats 0ms

/src/os/linux/ftk_linux.h

http://ftk.googlecode.com/
C++ Header | 73 lines | 33 code | 11 blank | 29 comment | 0 complexity | 2abc825dab124dc02c45f5f03811dbce MD5 | raw file
 1
 2/*
 3 * File: ftk_linux.h
 4 * Author:  Li XianJing <xianjimli@hotmail.com>
 5 * Brief:   linux specific functions.
 6 *
 7 * Copyright (c) 2009 - 2010  Li XianJing <xianjimli@hotmail.com>
 8 *
 9 * Licensed under the Academic Free License version 2.1
10 *
11 * This program is free software; you can redistribute it and/or modify
12 * it under the terms of the GNU General Public License as published by
13 * the Free Software Foundation; either version 2 of the License, or
14 * (at your option) any later version.
15 *
16 * This program is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
19 * GNU General Public License for more details.
20 *
21 * You should have received a copy of the GNU General Public License
22 * along with this program; if not, write to the Free Software
23 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
24 */
25
26/*
27 * History:
28 * ================================================================
29 * 2009-11-22 Li XianJing <xianjimli@hotmail.com> created
30 *
31 */
32
33#ifndef FTK_LINUX_H
34#define FTK_LINUX_H
35
36#include <fcntl.h>
37#include <dirent.h>
38#include <sys/types.h>
39#include <sys/types.h>
40#include <sys/stat.h>
41#include <errno.h>
42#include <unistd.h>
43#include <ctype.h>
44#include <linux/fb.h>
45#include <linux/kd.h>
46#include <linux/input.h>
47#include <sys/select.h>
48#include <sys/time.h>
49#include <sys/types.h>
50#include <sys/socket.h>
51
52#define ftk_strncpy   strncpy
53#define ftk_snprintf  snprintf
54#define ftk_vsnprintf vsnprintf 
55#define ftk_getcwd    getcwd
56#define ftk_sscanf    sscanf
57
58#define ftk_pipe_pair(fds)				pipe(fds)
59#define ftk_pipe_close(fd)				close(fd)
60#define ftk_pipe_recv(fd, buf, length)	read(fd, buf, length)
61#define ftk_pipe_send(fd, buf, length)	write(fd, buf, length)
62
63#ifdef HAVE_CONFIG_H
64#include "config_ftk.h"
65#endif
66
67#define FTK_PATH_DELIM '/'
68
69#define FTK_HAS_MAIN 1
70#define LINUX 1
71
72#endif/*FTK_LINUX_H*/
73