summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGurusamy Sarathy <gsar@cpan.org>1998-05-21 01:37:04 +0000
committerGurusamy Sarathy <gsar@cpan.org>1998-05-21 01:37:04 +0000
commit62520c913c464c89e94916880c0661ff91051cc2 (patch)
treebeb8bf0f2f62d70a5b676dfa837e58a791e81e04
parent60ce6247fb34169ad0a0e9bbab7a376ec9f7f2ff (diff)
downloadperl-62520c913c464c89e94916880c0661ff91051cc2.tar.gz
[win32] fix POSIX for mingw32
p4raw-id: //depot/win32/perl@1022
-rw-r--r--ext/POSIX/POSIX.xs8
-rw-r--r--win32/config.gc2
-rw-r--r--win32/config_H.gc152
3 files changed, 86 insertions, 76 deletions
diff --git a/ext/POSIX/POSIX.xs b/ext/POSIX/POSIX.xs
index 1dba9a61f8..97404b8426 100644
--- a/ext/POSIX/POSIX.xs
+++ b/ext/POSIX/POSIX.xs
@@ -108,6 +108,10 @@
# ifdef _MSC_VER
# define mode_t short
# endif
+# ifdef __MINGW32__
+# define mode_t short
+# define tzset() not_here("tzset")
+# endif
# define sigaction(a,b,c) not_here("sigaction")
# define sigpending(a) not_here("sigpending")
# define sigprocmask(a,b,c) not_here("sigprocmask")
@@ -255,13 +259,13 @@ unsigned long strtoul _((const char *, char **, int));
#define localeconv() not_here("localeconv")
#endif
-#ifndef WIN32
#ifdef HAS_TZNAME
+# ifndef WIN32
extern char *tzname[];
+# endif
#else
char *tzname[] = { "" , "" };
#endif
-#endif
/* XXX struct tm on some systems (SunOS4/BSD) contains extra (non POSIX)
* fields for which we don't have Configure support yet:
diff --git a/win32/config.gc b/win32/config.gc
index 73bf865f0d..19b33d53b9 100644
--- a/win32/config.gc
+++ b/win32/config.gc
@@ -257,7 +257,7 @@ d_telldir='define'
d_time='define'
d_times='define'
d_truncate='undef'
-d_tzname='define'
+d_tzname='undef'
d_umask='define'
d_uname='undef'
d_vfork='undef'
diff --git a/win32/config_H.gc b/win32/config_H.gc
index 78e52e83a6..2dc6335a3f 100644
--- a/win32/config_H.gc
+++ b/win32/config_H.gc
@@ -757,7 +757,7 @@
* This symbol, if defined, indicates that the tzname[] array is
* available to access timezone names.
*/
-#define HAS_TZNAME /**/
+/*#define HAS_TZNAME /**/
/* HAS_UMASK:
* This symbol, if defined, indicates that the umask routine is
@@ -900,47 +900,6 @@
*/
/*#define I_NETINET_IN /**/
-/* I_PWD:
- * This symbol, if defined, indicates to the C program that it should
- * include <pwd.h>.
- */
-/* PWQUOTA:
- * This symbol, if defined, indicates to the C program that struct passwd
- * contains pw_quota.
- */
-/* PWAGE:
- * This symbol, if defined, indicates to the C program that struct passwd
- * contains pw_age.
- */
-/* PWCHANGE:
- * This symbol, if defined, indicates to the C program that struct passwd
- * contains pw_change.
- */
-/* PWCLASS:
- * This symbol, if defined, indicates to the C program that struct passwd
- * contains pw_class.
- */
-/* PWEXPIRE:
- * This symbol, if defined, indicates to the C program that struct passwd
- * contains pw_expire.
- */
-/* PWGECOS:
- * This symbol, if defined, indicates to the C program that struct passwd
- * contains pw_gecos.
- */
-/* PWCOMMENT:
- * This symbol, if defined, indicates to the C program that struct passwd
- * contains pw_comment.
- */
-/*#define I_PWD /**/
-/*#define PWQUOTA /**/
-/*#define PWAGE /**/
-/*#define PWCHANGE /**/
-/*#define PWCLASS /**/
-/*#define PWEXPIRE /**/
-/*#define PWGECOS /**/
-/*#define PWCOMMENT /**/
-
/* I_SFIO:
* This symbol, if defined, indicates to the C program that it should
* include <sfio.h>.
@@ -1726,6 +1685,47 @@
*/
/*#define I_NETDB /**/
+/* I_PWD:
+ * This symbol, if defined, indicates to the C program that it should
+ * include <pwd.h>.
+ */
+/* PWQUOTA:
+ * This symbol, if defined, indicates to the C program that struct passwd
+ * contains pw_quota.
+ */
+/* PWAGE:
+ * This symbol, if defined, indicates to the C program that struct passwd
+ * contains pw_age.
+ */
+/* PWCHANGE:
+ * This symbol, if defined, indicates to the C program that struct passwd
+ * contains pw_change.
+ */
+/* PWCLASS:
+ * This symbol, if defined, indicates to the C program that struct passwd
+ * contains pw_class.
+ */
+/* PWEXPIRE:
+ * This symbol, if defined, indicates to the C program that struct passwd
+ * contains pw_expire.
+ */
+/* PWCOMMENT:
+ * This symbol, if defined, indicates to the C program that struct passwd
+ * contains pw_comment.
+ */
+/* PWGECOS:
+ * This symbol, if defined, indicates to the C program that struct passwd
+ * contains pw_gecos.
+ */
+/*#define I_PWD /**/
+/*#define PWQUOTA /**/
+/*#define PWAGE /**/
+/*#define PWCHANGE /**/
+/*#define PWCLASS /**/
+/*#define PWEXPIRE /**/
+/*#define PWCOMMENT /**/
+/*#define PWGECOS /**/
+
/* I_SYS_TYPES:
* This symbol, if defined, indicates to the C program that it should
* include <sys/types.h>.
@@ -1745,6 +1745,37 @@
#define PRIVLIB "c:\\perl5004.5x\\lib" /**/
#define PRIVLIB_EXP (win32_perllib_path(NULL)) /**/
+/* SIG_NAME:
+ * This symbol contains a list of signal names in order of
+ * signal number. This is intended
+ * to be used as a static array initialization, like this:
+ * char *sig_name[] = { SIG_NAME };
+ * The signals in the list are separated with commas, and each signal
+ * is surrounded by double quotes. There is no leading SIG in the signal
+ * name, i.e. SIGQUIT is known as "QUIT".
+ * Gaps in the signal numbers (up to NSIG) are filled in with NUMnn,
+ * etc., where nn is the actual signal number (e.g. NUM37).
+ * The signal number for sig_name[i] is stored in sig_num[i].
+ * The last element is 0 to terminate the list with a NULL. This
+ * corresponds to the 0 at the end of the sig_num list.
+ */
+/* SIG_NUM:
+ * This symbol contains a list of signal numbers, in the same order as the
+ * SIG_NAME list. It is suitable for static array initialization, as in:
+ * int sig_num[] = { SIG_NUM };
+ * The signals in the list are separated with commas, and the indices
+ * within that list and the SIG_NAME list match, so it's easy to compute
+ * the signal name from a number or vice versa at the price of a small
+ * dynamic linear lookup.
+ * Duplicates are allowed, but are moved to the end of the list.
+ * The signal number corresponding to sig_name[i] is sig_number[i].
+ * if (i < NSIG) then sig_number[i] == i.
+ * The last element is 0, corresponding to the 0 at the end of
+ * the sig_name list.
+ */
+#define SIG_NAME "ZERO", "INT", "QUIT", "ILL", "FPE", "KILL", "SEGV", "PIPE", "ALRM", "TERM", "CHLD", "BREAK", "ABRT", "STOP", "CONT", "CLD", 0 /**/
+#define SIG_NUM 0, 2, 3, 4, 8, 9, 11, 13, 14, 15, 20, 21, 22, 23, 25, 20, 0 /**/
+
/* SITEARCH:
* This symbol contains the name of the private library for this package.
* The library is private in the sense that it needn't be in anyone's
@@ -1885,37 +1916,6 @@
*/
#define Select_fd_set_t Perl_fd_set * /**/
-/* SIG_NAME:
- * This symbol contains a list of signal names in order of
- * signal number. This is intended
- * to be used as a static array initialization, like this:
- * char *sig_name[] = { SIG_NAME };
- * The signals in the list are separated with commas, and each signal
- * is surrounded by double quotes. There is no leading SIG in the signal
- * name, i.e. SIGQUIT is known as "QUIT".
- * Gaps in the signal numbers (up to NSIG) are filled in with NUMnn,
- * etc., where nn is the actual signal number (e.g. NUM37).
- * The signal number for sig_name[i] is stored in sig_num[i].
- * The last element is 0 to terminate the list with a NULL. This
- * corresponds to the 0 at the end of the sig_num list.
- */
-/* SIG_NUM:
- * This symbol contains a list of signal numbers, in the same order as the
- * SIG_NAME list. It is suitable for static array initialization, as in:
- * int sig_num[] = { SIG_NUM };
- * The signals in the list are separated with commas, and the indices
- * within that list and the SIG_NAME list match, so it's easy to compute
- * the signal name from a number or vice versa at the price of a small
- * dynamic linear lookup.
- * Duplicates are allowed, but are moved to the end of the list.
- * The signal number corresponding to sig_name[i] is sig_number[i].
- * if (i < NSIG) then sig_number[i] == i.
- * The last element is 0, corresponding to the 0 at the end of
- * the sig_name list.
- */
-#define SIG_NAME "ZERO", "INT", "QUIT", "ILL", "FPE", "KILL", "SEGV", "PIPE", "ALRM", "TERM", "CHLD", "BREAK", "ABRT", "STOP", "CONT", "CLD", 0 /**/
-#define SIG_NUM 0, 2, 3, 4, 8, 9, 11, 13, 14, 15, 20, 21, 22, 23, 25, 20, 0 /**/
-
/* ARCHNAME:
* This symbol holds a string representing the architecture name.
* It may be used to construct an architecture-dependant pathname
@@ -1929,7 +1929,13 @@
* routine is available to yield the execution of the current
* thread.
*/
+/* HAS_SCHED_YIELD:
+ * This symbol, if defined, indicates that the sched_yield
+ * routine is available to yield the execution of the current
+ * thread.
+ */
/*#define HAS_PTHREAD_YIELD /**/
+/*#define HAS_SCHED_YIELD /**/
/* PTHREADS_CREATED_JOINABLE:
* This symbol, if defined, indicates that pthreads are created