~ubuntu-branches/ubuntu/maverick/eucalyptus/maverick

« back to all changes in this revision

Viewing changes to util/misc.h

  • Committer: Bazaar Package Importer
  • Author(s): Dave Walker (Daviey)
  • Date: 2010-07-21 17:27:10 UTC
  • mfrom: (1.1.38 upstream)
  • Revision ID: james.westby@ubuntu.com-20100721172710-7xv07dmdqgivc3t9
Tags: 2.0~bzr1211-0ubuntu1
* New major upstream version merge, 2.0 (r1211).
* debian/patches/:
  - 01-wsdl-stubs.patch, debian/wsdl.md5sums: wsdl stubs updated.
  - 02-Makefile.patch: Updated to reflect new code layout.
  - 07-local_support_euca_conf-in.patch: Updated to reflect new code layout.
  - 08-ubuntu-default-networking.patch: Refreshed.
  - 09-small-128-192MB.patch: Updated to point to new location.
  - 10-disable-iscsi.patch: Refreshed.
  - 11-state-cleanup-memleakfix.patch: Removed, fixed upstream.
  - 15-fix-default-ramdisk.patch: Updated to point to new location.
  - 16-kvm_libvirt_xml_default_use_kvm.patch: Updated to reflect changes.
  - 17-fix_walrus_OOM_errors.patch: Removed, fixed upstream.
  - 18-priv_security.patch: Updated to reflect upstream changes.
  - 20-brute-force-webui.patch: Updated to reflect upstream changes. 
  - 21-eucalyptus-1.7-with-gwt-1.6.4.patch: New patch, allows 
    eucalyptus-1.7 to be built against gwt 1.6.4. Based on patch courtesy 
    of Dmitrii Zagorodnov, upstream. (LP: #597330)
* debian/eucalyptus-java-common.links: 
  - Changed symlink for groovy, point to groovy.all.jar, making compatiable 
    with groovy versions >1.7. (LP: #595421)
  - Added ant.jar & jetty-rewrite-handler.jar as they are now required.
* debian/control
  - & debian/build-jars: Added libjavassist-java and libjetty-extra-java as 
    build dependencies.
  - Added libjetty-extra-java as a dependency of eucalyptus-java-common
* The binary resulting jar's have been renamed from eucalyptus-*-1.6.2.jar
  to eucalyptus-*-main.jar:    
  - debian/eucalyptus-cc.upstart
  - debian/eucalyptus-cloud.install
  - debian/eucalyptus-common.eucalyptus.upstart
  - debian/eucalyptus-java-common.install
  - debian/eucalyptus-network.upstart
  - debian/eucalyptus-sc.install
  - debian/eucalyptus-walrus.install
* debian/eucalyptus-java-common.install: New upstream jars that have been
  installed:
  - eucalyptus-db-hsqldb-ext-main.jar
  - eucalyptus-component-main.jar
* debian/control:
  - Updated Standards Version to 3.8.4 (no change)
  - Updated the upstream Homepage to: http://open.eucalyptus.com/
  - Changed Vcs-Bzr to reflect new location of Ubuntu hosted development branch.
  - Made the Build Dependency of groovy and the binary eucalyptus-java-common
    package depend on version >=1.7.

Show diffs side-by-side

added added

removed removed

Lines of Context:
60
60
#ifndef INCLUDE_MISC_H
61
61
#define INCLUDE_MISC_H
62
62
 
 
63
#include <stdio.h>
63
64
#include <stdarg.h>
64
 
 
65
 
#ifndef NO_AXIS /* for compiling on systems without Axis */
66
 
#include <neethi_policy.h>
67
 
#include <neethi_util.h>
68
 
#include <axutil_utils.h>
69
 
#include <axis2_client.h>
70
 
#include <axis2_stub.h>
71
 
int InitWSSEC(axutil_env_t *env, axis2_stub_t *stub, char *policyFile);
 
65
#include <unistd.h> // ssize_t
 
66
#include <linux/limits.h>
 
67
 
 
68
typedef unsigned char boolean;
 
69
#define TRUE 1
 
70
#define FALSE 0
 
71
 
 
72
#ifndef MAX_PATH
 
73
#define MAX_PATH 4096
72
74
#endif
73
75
 
74
76
#define TIMERSTART(a) double a;                                 \
87
89
  }
88
90
 
89
91
#define SP(a) a ? a : "UNSET"
 
92
#define RANDALPHANUM rand()%2 ? rand()%26+97 : rand()%2 ? rand()%26+65 : rand()%10+48
90
93
 
91
94
enum {EUCADEBUG2, EUCADEBUG, EUCAINFO, EUCAWARN, EUCAERROR, EUCAFATAL};
92
95
 
93
96
char * replace_string (char ** stringp, char * source, char * destination );
94
97
int sscanf_lines (char * lines, char * format, void * varp);
 
98
char * fp2str (FILE * fp);
95
99
char * system_output (char * shell_command );
96
 
char *getConfString(char configFiles[][1024], int numFiles, char *key);
 
100
char *getConfString(char configFiles[][MAX_PATH], int numFiles, char *key);
97
101
 
98
102
/**
99
103
 * Search in file #path# for a variable named #name#. It will put
180
184
int touch (const char * path);
181
185
int diff (const char * path1, const char * path2);
182
186
long long dir_size (const char * path);
 
187
char * file2strn (const char * path, const ssize_t limit);
183
188
char * file2str (const char * path); /* read file 'path' into a new string */
184
189
int write2file(const char *path, char *str);
 
190
char * str2str (const char * str, const char * begin, const char * end);
185
191
long long str2longlong (const char * str, const char * begin, const char * end); /* extract integer from str bound by 'begin' and 'end' */
186
192
pid_t timewait(pid_t pid, int *status, int timeout);
187
193
int uint32compar(const void *ina, const void *inb);
190
196
int verify_helpers(char **helpers, char **helpers_path, int LASTHELPER);
191
197
int maxint(int a, int b);
192
198
int minint(int a, int b);
193
 
 
 
199
int copy_file (const char * src, const char * dst);
 
200
long long file_size (const char * file_path);
 
201
char * strduplc (const char * s);
 
202
char * xpath_content (const char * xml, const char * xpath);
194
203
 
195
204
#endif