s_win32
上传用户:tsgydb
上传日期:2007-04-14
资源大小:10674k
文件大小:2k
源码类别:

MySQL数据库

开发平台:

Visual C++

  1. #!/bin/sh -
  2. # $Id: s_win32,v 1.9 2000/09/20 15:29:54 bostic Exp $
  3. #
  4. # Build Windows/32 include files.
  5. msgc="/* DO NOT EDIT: automatically built by dist/s_win32. */"
  6. . RELEASE
  7. t=/tmp/__db_$$
  8. rm -f $t
  9. trap 'rm -f $t ; exit 1' 1 2 3 13 15
  10. f=../build_win32/db.h
  11. echo "Building $f"
  12. rm -f $f
  13. cat <<ENDOFSEDTEXT > $t
  14. s/@u_int8_decl@/typedef unsigned char u_int8_t;/
  15. s/@int16_decl@/typedef short int16_t;/
  16. s/@u_int16_decl@/typedef unsigned short u_int16_t;/
  17. s/@int32_decl@/typedef int int32_t;/
  18. s/@u_int32_decl@/typedef unsigned int u_int32_t;/
  19. /@u_char_decl@/{
  20. i\
  21. #if !defined(_WINSOCKAPI_)
  22. s/@u_char_decl@/typedef unsigned char u_char;/
  23. }
  24. s/@u_short_decl@/typedef unsigned short u_short;/
  25. s/@u_int_decl@/typedef unsigned int u_int;/
  26. /@u_long_decl@/{
  27. s/@u_long_decl@/typedef unsigned long u_long;/
  28. a\
  29. #endif
  30. }
  31. s/@ssize_t_decl@/typedef int ssize_t;/
  32. s/@DB_VERSION_MAJOR@/$DB_VERSION_MAJOR/
  33. s/@DB_VERSION_MINOR@/$DB_VERSION_MINOR/
  34. s/@DB_VERSION_PATCH@/$DB_VERSION_PATCH/
  35. s/@DB_VERSION_STRING@/"$DB_VERSION_STRING"/
  36. ENDOFSEDTEXT
  37. (echo "$msgc" && sed -f $t ../include/db.src) > $f
  38. chmod 444 $f
  39. f=../build_win32/db_int.h
  40. echo "Building $f"
  41. rm -f $f
  42. cat <<ENDOFSEDTEXT > $t
  43. s/(PATH_SEPARATOR[^"]*")/"/1\\\\\/:"/
  44. s/@db_align_t_decl@/typedef unsigned long db_align_t;/
  45. s/@db_alignp_t_decl@/typedef unsigned long db_alignp_t;/
  46. ENDOFSEDTEXT
  47. (echo "$msgc" && sed -f $t ../include/db_int.src) > $f
  48. chmod 444 $f
  49. f=../build_win32/libdb.rc
  50. echo "Building $f"
  51. rm -f $f
  52. cat <<ENDOFSEDTEXT > $t
  53. s/%MAJOR%/$DB_VERSION_MAJOR/
  54. s/%MINOR%/$DB_VERSION_MINOR/
  55. s/%PATCH%/$DB_VERSION_PATCH/
  56. ENDOFSEDTEXT
  57. sed -f $t ../build_win32/libdbrc.src > $f
  58. chmod 444 $f
  59. rm -f $t