1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2025-10-24 13:33:01 +03:00

Remove BeOS support

Haiku shouldn't be affected.
This commit is contained in:
Nick Wellnhofer
2022-09-04 01:05:51 +02:00
parent 38290ec103
commit 13a6637815
7 changed files with 1 additions and 391 deletions

View File

@@ -12,8 +12,6 @@
#include <pthread.h>
#elif defined HAVE_WIN32_THREADS
#include <windows.h>
#elif defined HAVE_BEOS_THREADS
#include <OS.h>
#endif
#include <string.h>
#if !defined(_MSC_VER)
@@ -27,8 +25,6 @@
static pthread_t tid[MAX_ARGC];
#elif defined HAVE_WIN32_THREADS
static HANDLE tid[MAX_ARGC];
#elif defined HAVE_BEOS_THREADS
static thread_id tid[MAX_ARGC];
#endif
typedef struct {
@@ -209,61 +205,7 @@ main(void)
return (0);
}
#elif defined HAVE_BEOS_THREADS
int
main(void)
{
unsigned int i, repeat;
status_t ret;
xmlInitParser();
printf("Parser initialized\n");
for (repeat = 0;repeat < TEST_REPEAT_COUNT;repeat++) {
printf("repeat: %d\n",repeat);
xmlLoadCatalog(catalog);
printf("loaded catalog: %s\n", catalog);
for (i = 0; i < num_threads; i++) {
tid[i] = (thread_id) -1;
}
printf("cleaned threads\n");
for (i = 0; i < num_threads; i++) {
tid[i] = spawn_thread(thread_specific_data, "xmlTestThread", B_NORMAL_PRIORITY, (void *) &threadParams[i]);
if (tid[i] < B_OK) {
perror("beos_thread_create");
exit(1);
}
printf("beos_thread_create %d -> %d\n", i, tid[i]);
}
for (i = 0; i < num_threads; i++) {
void *result;
ret = wait_for_thread(tid[i], &result);
printf("beos_thread_wait %d -> %d\n", i, ret);
if (ret != B_OK) {
perror("beos_thread_wait");
exit(1);
}
}
xmlCatalogCleanup();
ret = B_OK;
for (i = 0; i < num_threads; i++)
if (threadParams[i].okay == 0) {
printf("Thread %d handling %s failed\n", i,
threadParams[i].filename);
ret = B_ERROR;
}
}
xmlCleanupParser();
xmlMemoryDump();
if (ret == B_OK)
printf("testThread : BeOS : SUCCESS!\n");
else
printf("testThread : BeOS : FAILED!\n");
return (0);
}
#endif /* pthreads or BeOS threads */
#endif /* pthreads */
#else /* !LIBXML_THREADS_ENABLED */
int