mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-05-23 04:15:26 +00:00
Monotone-Parent: cf83f210bd51772341ff7ea082a7e6bd95fc4bea
Monotone-Revision: 38e85c6b518b49dd63fa7fc5c2c1c7a57037cff8 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2009-03-04T15:27:00 Monotone-Branch: ca.inverse.sogo
This commit is contained in:
@@ -1,3 +1,13 @@
|
||||
2009-03-04 Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
||||
|
||||
* SoObjects/SOGo/SOGoLDAPUserDefaultsBootstrap.m: new module for
|
||||
the libSOGoNSUserDefaults.so.1 library built when enabling
|
||||
ldap-based configuration.
|
||||
|
||||
* Main/sogod.m (BootstrapNSUserDefaults): added function to load a
|
||||
library named "libSOGoNSUserDefaults.so.1" which would bootstrap
|
||||
the NSUserDefaults class with an arbitrary "pose class".
|
||||
|
||||
2009-03-04 Ludovic Marcotte <lmarcotte@inverse.ca>
|
||||
|
||||
* Fixed a small issue when fetching parts where
|
||||
|
||||
@@ -4,7 +4,8 @@ BUILD_DATE = $(shell echo $$USER@$$HOSTNAME; date +"%Y%m%d%H%M")
|
||||
ADDITIONAL_CPPFLAGS += \
|
||||
-DSOGO_MAJOR_VERSION=$(MAJOR_VERSION) \
|
||||
-DSOGO_MINOR_VERSION=$(MINOR_VERSION) \
|
||||
-DSOGO_SUBMINOR_VERSION=$(SUBMINOR_VERSION)
|
||||
-DSOGO_SUBMINOR_VERSION=$(SUBMINOR_VERSION) \
|
||||
-DSOGO_LIBDIR="\"$(SOGO_LIBDIR)\""
|
||||
|
||||
ADDITIONAL_INCLUDE_DIRS += \
|
||||
-I../SoObjects/ \
|
||||
|
||||
+24
-3
@@ -19,6 +19,7 @@
|
||||
02111-1307, USA.
|
||||
*/
|
||||
|
||||
#import <dlfcn.h>
|
||||
#import <unistd.h>
|
||||
|
||||
#import <Foundation/NSAutoreleasePool.h>
|
||||
@@ -32,6 +33,28 @@
|
||||
#import <SOGo/SOGoLDAPUserDefaults.h>
|
||||
#endif
|
||||
|
||||
typedef void (*NSUserDefaultsInitFunction) ();
|
||||
|
||||
#define DIR_SEP "/"
|
||||
|
||||
static void
|
||||
BootstrapNSUserDefaults ()
|
||||
{
|
||||
char *filename;
|
||||
NSUserDefaultsInitFunction SOGoNSUserDefaultsBootstrap;
|
||||
void *handle;
|
||||
|
||||
filename = SOGO_LIBDIR DIR_SEP "libSOGoNSUserDefaults.so.1";
|
||||
handle = dlopen (filename, RTLD_NOW | RTLD_GLOBAL);
|
||||
if (handle)
|
||||
{
|
||||
SOGoNSUserDefaultsBootstrap = dlsym (handle,
|
||||
"SOGoNSUserDefaultsBootstrap");
|
||||
if (SOGoNSUserDefaultsBootstrap)
|
||||
SOGoNSUserDefaultsBootstrap ();
|
||||
}
|
||||
}
|
||||
|
||||
int
|
||||
main (int argc, char **argv, char **env)
|
||||
{
|
||||
@@ -42,9 +65,7 @@ main (int argc, char **argv, char **env)
|
||||
|
||||
pool = [NSAutoreleasePool new];
|
||||
|
||||
#if defined(LDAP_CONFIG)
|
||||
[SOGoLDAPUserDefaults poseAsClass: [NSUserDefaults class]];
|
||||
#endif
|
||||
BootstrapNSUserDefaults ();
|
||||
|
||||
rc = -1;
|
||||
|
||||
|
||||
@@ -109,8 +109,17 @@ SOGo_RESOURCE_FILES = \
|
||||
DAVReportMap.plist
|
||||
|
||||
ifeq ($(ldap_config),yes)
|
||||
SOGo_OBJC_FILES += SOGoLDAPUserDefaults.m
|
||||
SOGo_HEADER_FILES += SOGoLDAPUserDefaults.h
|
||||
|
||||
LIBRARY_NAME += \
|
||||
SOGoNSUserDefaults
|
||||
|
||||
SOGoNSUserDefaults_VERSION = 1
|
||||
SOGoNSUserDefaults_INSTALL_DIR = $(SOGO_LIBDIR)
|
||||
|
||||
SOGoNSUserDefaults_OBJC_FILES = \
|
||||
SOGoLDAPUserDefaultsBootstrap.m \
|
||||
SOGoLDAPUserDefaults.m
|
||||
|
||||
endif
|
||||
|
||||
# tools
|
||||
@@ -129,5 +138,6 @@ ifneq ($(FHS_INSTALL_ROOT),)
|
||||
GNUSTEP_HEADERS=$(DESTDIR)$(FHS_INSTALL_ROOT)/include
|
||||
endif
|
||||
include $(GNUSTEP_MAKEFILES)/framework.make
|
||||
include $(GNUSTEP_MAKEFILES)/library.make
|
||||
include $(GNUSTEP_MAKEFILES)/tool.make
|
||||
-include GNUmakefile.postamble
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
/* SOGoLDAPUserDefaultsBootstrap.m - this file is part of $PROJECT_NAME_HERE$
|
||||
*
|
||||
* Copyright (C) 2009 Inverse inc.
|
||||
*
|
||||
* Author: Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
||||
*
|
||||
* This file is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* This file is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; see the file COPYING. If not, write to
|
||||
* the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
* Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#import <stdio.h>
|
||||
|
||||
#import "SOGoLDAPUserDefaults.h"
|
||||
|
||||
void
|
||||
SOGoNSUserDefaultsBootstrap ()
|
||||
{
|
||||
[SOGoLDAPUserDefaults poseAsClass: [NSUserDefaults class]];
|
||||
}
|
||||
Reference in New Issue
Block a user