Permalink
Browse files

curl tool: use configuration files from lib directory

Configuration files such as curl_config.h and all config-*.h no longer exist
nor are generated/copied into 'src' directory, now these only exist in 'lib'
directory from where curl tool sources uses them.

Additionally old src/setup.h has been refactored into src/tool_setup.h which
now pulls lib/setup.h

The possibility of a makefile needing an include path adjustment exists.
  • Loading branch information...
1 parent 376b4d4 commit 919c97fa65a5c00f7044e849eeb0095408413505 @yangtse yangtse committed Apr 6, 2012
Showing with 324 additions and 1,296 deletions.
  1. +1 −4 buildconf
  2. +1 −1 configure.ac
  3. +3 −3 docs/INTERNALS
  4. +1 −0 include/curl/.gitignore
  5. +11 −14 lib/amigaos.c
  6. +11 −29 lib/amigaos.h
  7. +22 −8 lib/config-amigaos.h
  8. +13 −10 lib/config-mac.h
  9. +22 −8 lib/config-riscos.h
  10. +5 −6 lib/easy.c
  11. +18 −4 lib/setup.h
  12. +1 −7 maketgz
  13. +10 −15 src/Makefile.am
  14. +2 −2 src/Makefile.inc
  15. +1 −206 src/Makefile.netware
  16. +0 −70 src/config-amigaos.h
  17. +0 −57 src/config-mac.h
  18. +0 −402 src/config-riscos.h
  19. +1 −1 src/hugehelp.c.cvs
  20. +2 −2 src/hugehelp.h
  21. +2 −10 src/makefile.dj
  22. +0 −296 src/setup.h
  23. +2 −2 src/tool_binmode.c
  24. +2 −2 src/tool_binmode.h
  25. +2 −2 src/tool_bname.c
  26. +2 −2 src/tool_bname.h
  27. +2 −2 src/tool_cb_dbg.c
  28. +2 −2 src/tool_cb_dbg.h
  29. +2 −2 src/tool_cb_hdr.c
  30. +2 −2 src/tool_cb_hdr.h
  31. +2 −2 src/tool_cb_prg.c
  32. +2 −2 src/tool_cb_prg.h
  33. +2 −2 src/tool_cb_rea.c
  34. +2 −2 src/tool_cb_rea.h
  35. +2 −2 src/tool_cb_see.c
  36. +2 −2 src/tool_cb_see.h
  37. +2 −2 src/tool_cb_wrt.c
  38. +2 −2 src/tool_cb_wrt.h
  39. +2 −2 src/tool_cfgable.c
  40. +1 −1 src/tool_cfgable.h
  41. +2 −2 src/tool_convert.c
  42. +2 −2 src/tool_convert.h
  43. +2 −2 src/tool_dirhie.c
  44. +2 −2 src/tool_dirhie.h
  45. +2 −2 src/tool_doswin.c
  46. +2 −2 src/tool_doswin.h
  47. +1 −1 src/tool_easysrc.c
  48. +1 −1 src/tool_easysrc.h
  49. +1 −1 src/tool_formparse.c
  50. +2 −2 src/tool_formparse.h
  51. +1 −1 src/tool_getparam.c
  52. +2 −2 src/tool_getparam.h
  53. +2 −2 src/tool_getpass.c
  54. +2 −2 src/tool_getpass.h
  55. +1 −1 src/tool_help.c
  56. +2 −2 src/tool_help.h
  57. +2 −2 src/tool_helpers.c
  58. +2 −2 src/tool_helpers.h
  59. +2 −2 src/tool_homedir.c
  60. +2 −2 src/tool_homedir.h
  61. +2 −2 src/tool_libinfo.c
  62. +2 −2 src/tool_libinfo.h
  63. +2 −2 src/tool_main.c
  64. +2 −2 src/tool_main.h
  65. +2 −2 src/tool_mfiles.c
  66. +2 −2 src/tool_mfiles.h
  67. +2 −2 src/tool_msgs.c
  68. +2 −2 src/tool_msgs.h
  69. +1 −1 src/tool_operate.c
  70. +2 −2 src/tool_operate.h
  71. +2 −2 src/tool_operhlp.c
  72. +2 −2 src/tool_operhlp.h
  73. +2 −2 src/tool_panykey.c
  74. +2 −2 src/tool_panykey.h
  75. +2 −2 src/tool_paramhlp.c
  76. +2 −2 src/tool_paramhlp.h
  77. +2 −2 src/tool_parsecfg.c
  78. +2 −2 src/tool_parsecfg.h
  79. +2 −2 src/tool_sdecls.h
  80. +1 −1 src/tool_setopt.c
  81. +1 −1 src/tool_setopt.h
  82. +56 −0 src/tool_setup.h
  83. +2 −2 src/tool_sleep.c
  84. +2 −2 src/tool_sleep.h
  85. +2 −2 src/tool_urlglob.c
  86. +2 −2 src/tool_urlglob.h
  87. +2 −2 src/tool_util.c
  88. +2 −2 src/tool_util.h
  89. +2 −2 src/tool_vms.c
  90. +2 −2 src/tool_vms.h
  91. +2 −2 src/tool_writeenv.c
  92. +2 −2 src/tool_writeenv.h
  93. +2 −2 src/tool_writeout.c
  94. +2 −2 src/tool_writeout.h
  95. +2 −2 src/tool_xattr.c
  96. +2 −2 src/tool_xattr.h
  97. +4 −4 src/vc6curlsrc.dsp
View
@@ -6,7 +6,7 @@
# | (__| |_| | _ <| |___
# \___|\___/|_| \_\_____|
#
-# Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
+# Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, et al.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution. The terms
@@ -384,9 +384,6 @@ $PERL -i.bak -pe 's/\bmv +([^-\s])/mv -f $1/g' aclocal.m4
echo "buildconf: running autoheader"
${AUTOHEADER:-autoheader} || die "autoheader command failed"
-echo "buildconf: cp lib/curl_config.h.in src/curl_config.h.in"
-cp lib/curl_config.h.in src/curl_config.h.in
-
echo "buildconf: running autoconf"
${AUTOCONF:-autoconf} || die "autoconf command failed"
View
@@ -35,7 +35,7 @@ This configure script may be copied, distributed and modified under the
terms of the curl license; see COPYING for more details])
AC_CONFIG_SRCDIR([lib/urldata.h])
-AM_CONFIG_HEADER(lib/curl_config.h src/curl_config.h include/curl/curlbuild.h)
+AM_CONFIG_HEADER(lib/curl_config.h include/curl/curlbuild.h)
AC_CONFIG_MACRO_DIR([m4])
AM_MAINTAINER_MODE
View
@@ -104,9 +104,9 @@ Windows vs Unix
Inside the source code, We make an effort to avoid '#ifdef [Your OS]'. All
conditionals that deal with features *should* instead be in the format
'#ifdef HAVE_THAT_WEIRD_FUNCTION'. Since Windows can't run configure scripts,
- we maintain two curl_config-win32.h files (one in lib/ and one in src/) that
- are supposed to look exactly as a curl_config.h file would have looked like on
- a Windows machine!
+ we maintain a curl_config-win32.h file in lib directory that is supposed to
+ look exactly as a curl_config.h file would have looked like on a Windows
+ machine!
Generally speaking: always remember that this will be compiled on dozens of
operating systems. Don't walk on the edge.
View
@@ -1,3 +1,4 @@
curlbuild.h
+stamp-h2
stamp-h3
curlver.h.dist
View
@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2009, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
@@ -20,11 +20,14 @@
*
***************************************************************************/
-#ifdef __AMIGA__ /* Any AmigaOS flavour */
+#include "setup.h"
+
+#if defined(__AMIGA__) && !defined(__ixemul__)
-#include "amigaos.h"
#include <amitcp/socketbasetags.h>
+#include "amigaos.h"
+
struct Library *SocketBase = NULL;
extern int errno, h_errno;
@@ -35,15 +38,15 @@ void __request(const char *msg);
# define __request( msg ) Printf( msg "\n\a")
#endif
-void amiga_cleanup()
+void Curl_amiga_cleanup()
{
if(SocketBase) {
CloseLibrary(SocketBase);
SocketBase = NULL;
}
}
-BOOL amiga_init()
+bool Curl_amiga_init()
{
if(!SocketBase)
SocketBase = OpenLibrary("bsdsocket.library", 4);
@@ -61,20 +64,14 @@ BOOL amiga_init()
}
#ifndef __libnix__
- atexit(amiga_cleanup);
+ atexit(Curl_amiga_cleanup);
#endif
return TRUE;
}
#ifdef __libnix__
-ADD2EXIT(amiga_cleanup,-50);
-#endif
-
-#else /* __AMIGA__ */
-
-#ifdef __POCC__
-# pragma warn(disable:2024) /* Disable warning #2024: Empty input file */
+ADD2EXIT(Curl_amiga_cleanup,-50);
#endif
-#endif /* __AMIGA__ */
+#endif /* __AMIGA__ && ! __ixemul__ */
View
@@ -1,13 +1,13 @@
-#ifndef LIBCURL_AMIGAOS_H
-#define LIBCURL_AMIGAOS_H
+#ifndef HEADER_CURL_AMIGAOS_H
+#define HEADER_CURL_AMIGAOS_H
/***************************************************************************
* _ _ ____ _
* Project ___| | | | _ \| |
* / __| | | | |_) | |
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2007, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
@@ -21,37 +21,19 @@
* KIND, either express or implied.
*
***************************************************************************/
+#include "setup.h"
-#ifdef __AMIGA__ /* Any AmigaOS flavour */
+#if defined(__AMIGA__) && !defined(__ixemul__)
-#ifndef __ixemul__
+bool Curl_amiga_init();
+void Curl_amiga_cleanup();
-#include <exec/types.h>
-#include <exec/execbase.h>
+#else
-#include <proto/exec.h>
-#include <proto/dos.h>
+#define Curl_amiga_init() 1
+#define Curl_amiga_cleanup() Curl_nop_stmt
-#include <sys/socket.h>
-
-#include "config-amigaos.h"
-
-#ifndef select
-# define select(args...) WaitSelect( args, NULL)
-#endif
-#ifndef ioctl
-# define ioctl(a,b,c,d) IoctlSocket( (LONG)a, (ULONG)b, (char*)c)
#endif
-#define _AMIGASF 1
-
-extern void amiga_cleanup();
-extern BOOL amiga_init();
-
-#else /* __ixemul__ */
-
-#warning compiling with ixemul...
-#endif /* __ixemul__ */
-#endif /* __AMIGA__ */
-#endif /* LIBCURL_AMIGAOS_H */
+#endif /* HEADER_CURL_AMIGAOS_H */
View
@@ -1,13 +1,13 @@
-#ifndef LIBCURL_CONFIG_AMIGAOS_H
-#define LIBCURL_CONFIG_AMIGAOS_H
+#ifndef HEADER_CURL_CONFIG_AMIGAOS_H
+#define HEADER_CURL_CONFIG_AMIGAOS_H
/***************************************************************************
* _ _ ____ _
* Project ___| | | | _ \| |
* / __| | | | |_) | |
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
@@ -22,6 +22,10 @@
*
***************************************************************************/
+/* ================================================================ */
+/* Hand crafted config file for AmigaOS */
+/* ================================================================ */
+
#ifdef __AMIGA__ /* Any AmigaOS flavour */
#define HAVE_ARPA_INET_H 1
@@ -72,8 +76,6 @@
#define HAVE_SYS_STAT_H 1
#define HAVE_SYS_TIME_H 1
#define HAVE_SYS_TYPES_H 1
-#define HAVE_TERMIOS_H 1
-#define HAVE_TERMIO_H 1
#define HAVE_TIME_H 1
#define HAVE_UNAME 1
#define HAVE_UNISTD_H 1
@@ -89,11 +91,11 @@
#define SIZEOF_SHORT 2
#define SIZEOF_SIZE_T 4
+#define USE_MANUAL 1
#define USE_OPENSSL 1
#define USE_SSLEAY 1
#define CURL_DISABLE_LDAP 1
-
#define OS "AmigaOS"
#define PACKAGE "curl"
@@ -114,8 +116,20 @@
#define in_addr_t int
+#ifndef F_OK
+# define F_OK 0
+#endif
+
#ifndef O_RDONLY
-# define O_RDONLY 0x0000
+# define O_RDONLY 0x0000
+#endif
+
+#ifndef LONG_MAX
+# define LONG_MAX 0x7fffffffL
+#endif
+
+#ifndef LONG_MIN
+# define LONG_MIN (-0x7fffffffL-1)
#endif
#define HAVE_GETNAMEINFO 1
@@ -150,4 +164,4 @@
#define SEND_TYPE_RETV int
#endif /* __AMIGA__ */
-#endif /* LIBCURL_CONFIG_AMIGAOS_H */
+#endif /* HEADER_CURL_CONFIG_AMIGAOS_H */
View
@@ -1,13 +1,13 @@
-#ifndef __LIB_CONFIG_MAC_H
-#define __LIB_CONFIG_MAC_H
+#ifndef HEADER_CURL_CONFIG_MAC_H
+#define HEADER_CURL_CONFIG_MAC_H
/***************************************************************************
* _ _ ____ _
* Project ___| | | | _ \| |
* / __| | | | |_) | |
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
@@ -23,13 +23,16 @@
***************************************************************************/
/* =================================================================== */
-/* lib/config-mac.h - Hand crafted config file for Mac OS 9 */
+/* Hand crafted config file for Mac OS 9 */
/* =================================================================== */
/* On Mac OS X you must run configure to generate curl_config.h file */
/* =================================================================== */
#define OS "mac"
+/* Define if you want the built-in manual */
+#define USE_MANUAL 1
+
#define HAVE_ERRNO_H 1
#define HAVE_NETINET_IN_H 1
#define HAVE_SYS_SOCKET_H 1
@@ -43,15 +46,16 @@
#define HAVE_FCNTL_H 1
#define HAVE_SYS_STAT_H 1
#define HAVE_ALLOCA_H 1
-#define HAVE_TIME_H 1
#define HAVE_STDLIB_H 1
+#define HAVE_TIME_H 1
#define HAVE_UTIME_H 1
#define HAVE_SYS_TIME_H 1
+#define HAVE_SYS_UTIME_H 1
#define TIME_WITH_SYS_TIME 1
#define HAVE_ALARM 1
-#define HAVE_STRDUP 1
+#define HAVE_FTRUNCATE 1
#define HAVE_UTIME 1
#define HAVE_SETVBUF 1
#define HAVE_STRFTIME 1
@@ -61,14 +65,13 @@
#define HAVE_SOCKET 1
#define HAVE_STRUCT_TIMEVAL 1
-//#define HAVE_STRICMP 1
#define HAVE_SIGACTION 1
#define HAVE_SIGNAL_H 1
#define HAVE_SIG_ATOMIC_T 1
#ifdef MACOS_SSL_SUPPORT
-# define USE_SSLEAY 1
-# define USE_OPENSSL 1
+# define USE_SSLEAY 1
+# define USE_OPENSSL 1
#endif
#define CURL_DISABLE_LDAP 1
@@ -120,4 +123,4 @@
#define HAVE_EXTRA_STRICMP_H 1
#define HAVE_EXTRA_STRDUP_H 1
-#endif /* __LIB_CONFIG_MAC_H */
+#endif /* HEADER_CURL_CONFIG_MAC_H */
Oops, something went wrong.

0 comments on commit 919c97f

Please sign in to comment.