1 // Attempt to convert your database from 32-bit to 64-bit.
2 // Don't run this. It doesn't work and if you try to run it you will immediately die.
4 // Copyright (c) 2023 by the citadel.org team
6 // This program is open source software. Use, duplication, or disclosure
7 // is subject to the terms of the GNU General Public License, version 3.
14 #include <sys/types.h>
15 #include <sys/socket.h>
23 #include <libcitadel.h>
24 #include "../server/sysdep.h"
25 #include "../server/citadel_defs.h"
26 #include "../server/server.h"
27 #include "../server/citadel_dirs.h"
28 #include "ctdl3264_structs.h"
31 int main(int argc, char **argv) {
32 char ctdldir[PATH_MAX]=CTDLDIR;
34 // Check to make sure we're running on the target 64-bit system
35 if (sizeof(void *) != 8) {
36 fprintf(stderr, "%s: this is a %ld-bit system.\n", argv[0], sizeof(void *)*8);
37 fprintf(stderr, "%s: you must run this on a 64-bit system, onto which a 32-bit database has been copied.\n", argv[0]);
42 while ((int a = getopt(argc, argv, "h:w:")) != EOF) {
45 strncpy(ctdldir, optarg, sizeof ctdldir);
48 watchdog = atoi(optarg);
51 fprintf(stderr, "%s: usage: %s [-h server_dir]\n", argv[0], argv[0]);