Changeset 2301 in kBuild for trunk/src/kash/shfile.c
- Timestamp:
- Mar 1, 2009 5:37:11 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/kash/shfile.c
r2298 r2301 25 25 */ 26 26 27 /******************************************************************************* 28 * Header Files * 29 *******************************************************************************/ 27 30 #include "shfile.h" 28 31 #include "shinstance.h" /* TRACE2 */ … … 50 53 * Whether the file descriptor table stuff is actually in use or not. 51 54 */ 52 #if !defined(SH_PURE_STUB_MODE) \ 53 && ( K_OS == K_OS_WINDOWS \ 54 || ( !defined(SH_STUB_MODE) \ 55 && !defined(SH_FORKED_MODE)) \ 56 ) 55 #if K_OS == K_OS_WINDOWS \ 56 || ( !defined(SH_STUB_MODE) \ 57 && !defined(SH_FORKED_MODE)) 57 58 # define SHFILE_IN_USE 58 59 #endif … … 599 600 # endif /* K_OS != K_OS_WINDOWS */ 600 601 601 #elif defined(SH_PURE_STUB_MODE)602 fd = -1;603 errno = ENOSYS;604 605 602 #elif defined(SH_STUB_MODE) || defined(SH_FORKED_MODE) 606 603 fd = open(name, flags, mode); … … 684 681 } 685 682 686 #elif defined(SH_PURE_STUB_MODE)687 rc = -1;688 errno = ENOSYS;689 690 683 #elif defined(SH_STUB_MODE) || defined(SH_FORKED_MODE) 691 684 # ifdef _MSC_VER … … 703 696 { 704 697 int rc; 705 #ifdef SH_PURE_STUB_MODE 706 rc = -1; 707 708 #elif defined(SH_STUB_MODE) || defined(SH_FORKED_MODE) 698 #if defined(SH_STUB_MODE) || defined(SH_FORKED_MODE) 709 699 rc = dup(fd); 710 700 … … 738 728 else 739 729 rc = -1; 740 741 #elif defined(SH_PURE_STUB_MODE)742 rc = -1;743 730 744 731 #elif defined(SH_STUB_MODE) || defined(SH_FORKED_MODE) … … 776 763 rc = -1; 777 764 778 #elif defined(SH_PURE_STUB_MODE)779 rc = -1;780 781 765 #elif defined(SH_STUB_MODE) || defined(SH_FORKED_MODE) 782 766 # ifdef _MSC_VER … … 814 798 else 815 799 rc = -1; 816 817 #elif defined(SH_PURE_STUB_MODE)818 rc = -1;819 800 820 801 #elif defined(SH_STUB_MODE) || defined(SH_FORKED_MODE) … … 854 835 else 855 836 rc = -1; 856 857 #elif defined(SH_PURE_STUB_MODE)858 rc = -1;859 837 860 838 #elif defined(SH_STUB_MODE) || defined(SH_FORKED_MODE) … … 940 918 else 941 919 rc = -1; 942 943 #elif defined(SH_PURE_STUB_MODE)944 rc = -1;945 920 946 921 #elif defined(SH_STUB_MODE) || defined(SH_FORKED_MODE) … … 1013 988 int shfile_stat(shfdtab *pfdtab, const char *path, struct stat *pst) 1014 989 { 1015 #ifdef SH_PURE_STUB_MODE 1016 return -1; 1017 1018 #elif defined(SH_STUB_MODE) || defined(SH_FORKED_MODE) 990 #if defined(SH_STUB_MODE) || defined(SH_FORKED_MODE) 1019 991 return stat(path, pst); 1020 992 … … 1025 997 int shfile_lstat(shfdtab *pfdtab, const char *link, struct stat *pst) 1026 998 { 1027 #ifdef SH_PURE_STUB_MODE 1028 return -1; 1029 1030 #elif defined(SH_STUB_MODE) || defined(SH_FORKED_MODE) 999 #if defined(SH_STUB_MODE) || defined(SH_FORKED_MODE) 1031 1000 # ifdef _MSC_VER 1032 1001 return stat(link, pst); … … 1041 1010 int shfile_chdir(shfdtab *pfdtab, const char *path) 1042 1011 { 1043 #ifdef SH_PURE_STUB_MODE 1044 return -1; 1045 1046 #elif defined(SH_STUB_MODE) || defined(SH_FORKED_MODE) 1012 #if defined(SH_STUB_MODE) || defined(SH_FORKED_MODE) 1047 1013 # ifdef _MSC_VER //??? 1048 1014 return chdir(path); … … 1057 1023 char *shfile_getcwd(shfdtab *pfdtab, char *buf, int len) 1058 1024 { 1059 #ifdef SH_PURE_STUB_MODE 1060 return NULL; 1061 1062 #elif defined(SH_STUB_MODE) || defined(SH_FORKED_MODE) 1025 #if defined(SH_STUB_MODE) || defined(SH_FORKED_MODE) 1063 1026 return getcwd(buf, len); 1064 1027 … … 1069 1032 int shfile_access(shfdtab *pfdtab, const char *path, int type) 1070 1033 { 1071 #ifdef SH_PURE_STUB_MODE 1072 return -1; 1073 1074 #elif defined(SH_STUB_MODE) || defined(SH_FORKED_MODE) 1034 #if defined(SH_STUB_MODE) || defined(SH_FORKED_MODE) 1075 1035 # ifdef _MSC_VER 1076 1036 type &= ~X_OK; … … 1088 1048 int rc; 1089 1049 1090 #ifdef SH_PURE_STUB_MODE 1091 rc = 0; 1092 #elif defined(SH_STUB_MODE) || defined(SH_FORKED_MODE) 1050 #if defined(SH_STUB_MODE) || defined(SH_FORKED_MODE) 1093 1051 rc = isatty(fd); 1094 1052 #else … … 1104 1062 int rc; 1105 1063 1106 #ifdef SH_PURE_STUB_MODE 1107 rc = -1; 1108 1109 #elif defined(SH_STUB_MODE) || defined(SH_FORKED_MODE) 1064 #if defined(SH_STUB_MODE) || defined(SH_FORKED_MODE) 1110 1065 # ifdef _MSC_VER 1111 1066 errno = ENOSYS; … … 1128 1083 int rc; 1129 1084 1130 #ifdef SH_PURE_STUB_MODE 1131 rc = -1; 1132 1133 #elif defined(SH_STUB_MODE) || defined(SH_FORKED_MODE) 1085 #if defined(SH_STUB_MODE) || defined(SH_FORKED_MODE) 1134 1086 # ifdef _MSC_VER 1135 1087 errno = ENOSYS; … … 1149 1101 mode_t shfile_get_umask(shfdtab *pfdtab) 1150 1102 { 1151 #if def SH_PURE_STUB_MODE1103 #if defined(SH_STUB_MODE) || defined(SH_FORKED_MODE) 1152 1104 return 022; 1153 1105 1154 #elif defined(SH_STUB_MODE) || defined(SH_FORKED_MODE)1155 return 022;1156 1157 1106 #else 1158 1107 #endif … … 1167 1116 shdir *shfile_opendir(shfdtab *pfdtab, const char *dir) 1168 1117 { 1169 #ifdef SH_PURE_STUB_MODE 1170 return NULL; 1171 1172 #elif defined(SH_STUB_MODE) || defined(SH_FORKED_MODE) 1118 #if defined(SH_STUB_MODE) || defined(SH_FORKED_MODE) 1173 1119 # ifdef _MSC_VER 1174 1120 errno = ENOSYS; … … 1184 1130 shdirent *shfile_readdir(struct shdir *pdir) 1185 1131 { 1186 #ifdef SH_PURE_STUB_MODE 1187 return NULL; 1188 1189 #elif defined(SH_STUB_MODE) || defined(SH_FORKED_MODE) 1132 #if defined(SH_STUB_MODE) || defined(SH_FORKED_MODE) 1190 1133 # ifdef _MSC_VER 1191 1134 errno = ENOSYS; … … 1202 1145 void shfile_closedir(struct shdir *pdir) 1203 1146 { 1204 #ifdef SH_PURE_STUB_MODE 1205 return NULL; 1206 1207 #elif defined(SH_STUB_MODE) || defined(SH_FORKED_MODE) 1147 #if defined(SH_STUB_MODE) || defined(SH_FORKED_MODE) 1208 1148 # ifdef _MSC_VER 1209 1149 errno = ENOSYS;
Note:
See TracChangeset
for help on using the changeset viewer.