This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Add &CORE::glob
[perl5.git] / symbian / symbian_proto.h
1 /*
2  *      symbian_proto.h
3  *
4  *      Copyright (c) Nokia 2004-2005.  All rights reserved.
5  *      This code is licensed under the same terms as Perl itself.
6  *
7  */
8
9 #ifndef SYMBIAN_PROTO_H
10 #define SYMBIAN_PROTO_H
11
12 #include <sys/types.h>
13 #include <sys/times.h>
14
15 #if defined(PERL_CORE) || defined(PERL_EXT)
16
17 /* We can't include the <string.h> unconditionally
18  * since it has prototypes conflicting with the gcc builtins. */
19 extern void  *memchr(const void *s, int c, size_t n);
20 #ifndef DL_SYMBIAN_XS
21 /* dl_symbian.xs needs to see the C++ prototype of memset() instead */
22 extern void  *memset(void *s, int c, size_t n);
23 extern size_t strlen(const char *s);
24 #endif
25 extern void  *memmove(void *dst, const void *src, size_t n);
26 extern char  *strcat(char *dst, const char *src);
27 extern char  *strchr(const char *s, int c);
28 extern char  *strerror(int errnum);
29 extern int    strncmp(const char *s1, const char *s2, size_t n);
30 extern char  *strrchr(const char *s, int c);
31
32 extern int setmode(int fd, long flags);
33
34 #ifndef __GNUC__
35 #define memcpy _e32memcpy /* GCC intrinsic */
36 extern void  *memcpy(const void *s1, const void *s2, size_t n);
37 extern int    strcmp(const char *s1, const char *s2);
38 extern char*  strcpy(char *dst, const char *src);
39 extern char*  strncpy(char *dst, const char *src, size_t n);
40 #endif
41
42 #endif /* PERL_CORE || PERL_EXT */
43
44 #if defined(SYMBIAN_DLL_CPP) || defined(SYMBIAN_UTILS_CPP) || defined(PERLBASE_CPP) || defined(PERLUTIL_CPP)
45 #  define PERL_SYMBIAN_START_EXTERN_C extern "C" {
46 #  define PERL_SYMBIAN_IMPORT_C       IMPORT_C /* Declarations have IMPORT_C, definitions have EXPORT_C. */
47 #  define PERL_SYMBIAN_END_EXTERN_C   }
48 #else
49 #  define PERL_SYMBIAN_START_EXTERN_C
50 #  define PERL_SYMBIAN_IMPORT_C
51 #  define PERL_SYMBIAN_END_EXTERN_C
52 #endif
53
54 PERL_SYMBIAN_START_EXTERN_C
55 PERL_SYMBIAN_IMPORT_C int   symbian_sys_init(int *argcp, char ***argvp);
56 PERL_SYMBIAN_IMPORT_C void  init_os_extras(void);
57 PERL_SYMBIAN_IMPORT_C void* symbian_get_vars(void);
58 PERL_SYMBIAN_IMPORT_C void  symbian_set_vars(const void *);
59 PERL_SYMBIAN_IMPORT_C void  symbian_unset_vars(void);
60 PERL_SYMBIAN_IMPORT_C SSize_t symbian_read_stdin(const int fd, char *b, int n);
61 PERL_SYMBIAN_IMPORT_C SSize_t symbian_write_stdout(const int fd, const char *b, int n);
62 PERL_SYMBIAN_IMPORT_C char* symbian_get_error_string(const int error);
63 PERL_SYMBIAN_IMPORT_C void symbian_sleep_usec(const long usec);
64 PERL_SYMBIAN_IMPORT_C int symbian_get_cpu_time(long* sec, long* usec);
65 PERL_SYMBIAN_IMPORT_C clock_t symbian_times(struct tms* buf);
66 PERL_SYMBIAN_IMPORT_C int symbian_usleep(unsigned int usec);
67 PERL_SYMBIAN_IMPORT_C int symbian_do_aspawn(void* vreally, void *vmark, void* sp);
68 PERL_SYMBIAN_IMPORT_C int symbian_do_spawn(const char* command);
69 PERL_SYMBIAN_IMPORT_C int symbian_do_spawn_nowait(const char* command);
70 PERL_SYMBIAN_END_EXTERN_C
71
72 #endif /* !SYMBIAN_PROTO_H */
73