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