This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
another g++ patch (Util.xs)
[perl5.git] / symbian / symbian_proto.h
CommitLineData
27da23d5
JH
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. */
19extern 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 */
22extern void *memset(void *s, int c, size_t n);
23extern size_t strlen(const char *s);
24#endif
25extern void *memmove(void *dst, const void *src, size_t n);
26extern char *strcat(char *dst, const char *src);
27extern char *strchr(const char *s, int c);
28extern char *strerror(int errnum);
29extern int strncmp(const char *s1, const char *s2, size_t n);
30extern char *strrchr(const char *s, int c);
31
32extern int setmode(int fd, long flags);
33
34#ifndef __GNUC__
35#define memcpy _e32memcpy /* GCC intrinsic */
36extern void *memcpy(const void *s1, const void *s2, size_t n);
37extern int strcmp(const char *s1, const char *s2);
38extern char* strcpy(char *dst, const char *src);
39extern char* strncpy(char *dst, const char *src, size_t n);
40#endif
41
42#endif /* PERL_CORE || PERL_EXT */
43
c8f896e5 44#if defined(SYMBIAN_DLL_CPP) || defined(SYMBIAN_UTILS_CPP) || defined(PERLBASE_CPP) || defined(PERLUTIL_CPP)
27da23d5 45# define PERL_SYMBIAN_START_EXTERN_C extern "C" {
d0d72822 46# define PERL_SYMBIAN_IMPORT_C IMPORT_C /* Declarations have IMPORT_C, definitions have EXPORT_C. */
27da23d5
JH
47# define PERL_SYMBIAN_END_EXTERN_C }
48#else
49# define PERL_SYMBIAN_START_EXTERN_C
d0d72822 50# define PERL_SYMBIAN_IMPORT_C
27da23d5
JH
51# define PERL_SYMBIAN_END_EXTERN_C
52#endif
53
54PERL_SYMBIAN_START_EXTERN_C
d0d72822
JH
55PERL_SYMBIAN_IMPORT_C int symbian_sys_init(int *argcp, char ***argvp);
56PERL_SYMBIAN_IMPORT_C void init_os_extras(void);
57PERL_SYMBIAN_IMPORT_C void* symbian_get_vars(void);
58PERL_SYMBIAN_IMPORT_C void symbian_set_vars(const void *);
59PERL_SYMBIAN_IMPORT_C void symbian_unset_vars(void);
60PERL_SYMBIAN_IMPORT_C SSize_t symbian_read_stdin(const int fd, char *b, int n);
61PERL_SYMBIAN_IMPORT_C SSize_t symbian_write_stdout(const int fd, const char *b, int n);
62PERL_SYMBIAN_IMPORT_C char* symbian_get_error_string(const int error);
63PERL_SYMBIAN_IMPORT_C void symbian_sleep_usec(const long usec);
64PERL_SYMBIAN_IMPORT_C int symbian_get_cpu_time(long* sec, long* usec);
65PERL_SYMBIAN_IMPORT_C clock_t symbian_times(struct tms* buf);
66PERL_SYMBIAN_IMPORT_C int symbian_usleep(unsigned int usec);
67PERL_SYMBIAN_IMPORT_C int symbian_do_aspawn(void* vreally, void *vmark, void* sp);
68PERL_SYMBIAN_IMPORT_C int symbian_do_spawn(const char* command);
69PERL_SYMBIAN_IMPORT_C int symbian_do_spawn_nowait(const char* command);
27da23d5
JH
70PERL_SYMBIAN_END_EXTERN_C
71
72#endif /* !SYMBIAN_PROTO_H */
73