extra code in pp_concat, Take 2
[p5sagit/p5-mst-13.2.git] / NetWare / nw5iop.h
CommitLineData
2986a63f 1
2/*
3 * Copyright © 2001 Novell, Inc. All Rights Reserved.
4 *
5 * You may distribute under the terms of either the GNU General Public
6 * License or the Artistic License, as specified in the README file.
7 *
8 */
9
10/*
11 * FILENAME : nw5iop.h
12 * DESCRIPTION : Redefined functions for NetWare.
13 * Author : SGP, HYAK
14 * Date : January 2001.
15 *
16 */
17
18
19
20#ifndef NW5IOP_H
21#define NW5IOP_H
22
23
24#ifndef START_EXTERN_C
25#ifdef __cplusplus
26# define START_EXTERN_C extern "C" {
27# define END_EXTERN_C }
28# define EXTERN_C extern "C"
29#else
30# define START_EXTERN_C
31# define END_EXTERN_C
32# define EXTERN_C
33#endif
34#endif
35
36#if defined(_MSC_VER) || defined(__MINGW32__)
37# include <sys/utime.h>
38#else
39# include <utime.h>
40#endif
41
42/*
43 * defines for flock emulation
44 */
45#define LOCK_SH 1
46#define LOCK_EX 2
47#define LOCK_NB 4
48#define LOCK_UN 8
49
50
51/*
52 * Make this as close to original stdio as possible.
53 */
54
55/*
56 * function prototypes for our own win32io layer
57 */
58/********CHKSGP ****/
59//making DLLExport as nothing
60#define DllExport
61/*******************/
62
63START_EXTERN_C
64
65int * nw_errno(void);
66char *** nw_environ(void);
67
68FILE* nw_stdin(void);
69FILE* nw_stdout(void);
70FILE* nw_stderr(void);
71int nw_ferror(FILE *fp);
72int nw_feof(FILE *fp);
73
74char* nw_strerror(int e);
75
76int nw_fprintf(FILE *pf, const char *format, ...);
77int nw_printf(const char *format, ...);
78int nw_vfprintf(FILE *pf, const char *format, va_list arg);
79int nw_vprintf(const char *format, va_list arg);
80
81size_t nw_fread(void *buf, size_t size, size_t count, FILE *pf);
82size_t nw_fwrite(const void *buf, size_t size, size_t count, FILE *pf);
83FILE* nw_fopen(const char *path, const char *mode);
84FILE* nw_fdopen(int fh, const char *mode);
85FILE* nw_freopen(const char *path, const char *mode, FILE *pf);
86int nw_fclose(FILE *pf);
87
88int nw_fputs(const char *s,FILE *pf);
89int nw_fputc(int c,FILE *pf);
90int nw_ungetc(int c,FILE *pf);
91int nw_getc(FILE *pf);
92int nw_fileno(FILE *pf);
93void nw_clearerr(FILE *pf);
94int nw_fflush(FILE *pf);
95long nw_ftell(FILE *pf);
96int nw_fseek(FILE *pf,long offset,int origin);
97int nw_fgetpos(FILE *pf,fpos_t *p);
98int nw_fsetpos(FILE *pf,const fpos_t *p);
99void nw_rewind(FILE *pf);
100FILE* nw_tmpfile(void);
101
102void nw_abort(void);
103
104int nw_stat(const char *name,struct stat *sbufptr);
105
106FILE* nw_Popen(char* command, char* mode, int* e);
107int nw_Pclose(FILE* file, int* e);
108int nw_Pipe(int* a, int* e);
109
110int nw_rename( const char *oname, const char *newname);
111//int nw_setmode( int fd, int mode);
112int nw_setmode( FILE *fp, int mode);
113long nw_lseek( int fd, long offset, int origin);
114int nw_dup( int fd);
115int nw_dup2(int h1, int h2);
116int nw_open(const char *path, int oflag,...);
117int nw_close(int fd);
118int nw_read(int fd, void *buf, unsigned int cnt);
119int nw_write(int fd, const void *buf, unsigned int cnt);
120
121int nw_spawnvp(int mode, char *cmdname, char **argv);
122
123int nw_rmdir(const char *dir);
124int nw_chdir(const char *dir);
125int nw_flock(int fd, int oper);
126
127int nw_execv(char *cmdname, char **argv);
128int nw_execvp(char *cmdname, char **argv);
129
130void nw_setbuf(FILE *pf, char *buf);
131int nw_setvbuf(FILE *pf, char *buf, int type, size_t size);
132char* nw_fgets(char *s, int n, FILE *pf);
133
134int nw_fgetc(FILE *pf);
135
136int nw_putc(int c, FILE *pf);
137
138int nw_open_osfhandle(long handle, int flags);
139long nw_get_osfhandle(int fd);
140
141DIR* nw_opendir(char *filename);
142struct direct* nw_readdir(DIR *dirp);
143long nw_telldir(DIR *dirp);
144void nw_seekdir(DIR *dirp, long loc);
145void nw_rewinddir(DIR *dirp);
146int nw_closedir(DIR *dirp);
147
148unsigned int nw_sleep(unsigned int);
149int nw_times(struct tms *timebuf);
150
151int nw_stat(const char *path, struct stat *buf);
152int nw_link(const char *oldname, const char *newname);
153int nw_unlink(const char *f);
154int nw_utime(const char *f, struct utimbuf *t);
155DllExport int nw_uname(struct utsname *n);
156
157int nw_wait(int *status);
158
159int nw_waitpid(int pid, int *status, int flags);
160int nw_kill(int pid, int sig);
161
162unsigned long nw_os_id(void);
163void* nw_dynaload(const char*filename);
164
165int nw_access(const char *path, int mode);
166int nw_chmod(const char *path, int mode);
167int nw_getpid(void);
168
169char * nw_crypt(const char *txt, const char *salt);
170
171int nw_isatty(int fd);
172char* nw_mktemp(char *Template);
173int nw_chsize(int handle, long size);
174END_EXTERN_C
175
176
177/*
178 * the following six(6) is #define in stdio.h
179 */
180#ifndef WIN32IO_IS_STDIO
181#undef environ
182#undef feof
183#undef pipe
184#undef pause
185#undef sleep
186#undef times
187#undef alarm
188#undef ioctl
189#undef unlink
190#undef utime
191#undef uname
192#undef wait
193
194#ifdef __BORLANDC__
195#undef ungetc
196#undef getc
197#undef putc
198#undef getchar
199#undef putchar
200#undef fileno
201#endif
202
203#define environ (*nw_environ())
204
205
206#if !defined(MYMALLOC) || !defined(PERL_CORE)
207
208#endif
209
210
211#endif /* WIN32IO_IS_STDIO */
212#endif /* NW5IOP_H */
213